Openlog file date and time

I have looked through a lot of forums and haven’t seen one on this topic. I am writing files to the sd card with good success but all the files have 1/1/2000 12:00 AM as the date and time created. Is there a way to get that changed to the correct date and time? I am using a SAMD51 sparkfun with a QWIIC openlog device.

Hi, thanks for writing in.

I think the reason why this date has been set and does not change is because there is no input of the code to go off of to change the file header. That would require a real time clock module. You should be able to change the code to change the file header to what the real time clock module outputs at the time which once set with a working back up battery should be real time.

https://www.sparkfun.com/products/16281

or

https://www.sparkfun.com/products/10160

I hope this helps.