When Openlog creates a new file the default date/time is 1/1/2000 12:00AM.
Can the date and time be changed/updated?
When Openlog creates a new file the default date/time is 1/1/2000 12:00AM.
Can the date and time be changed/updated?
Opening doesn’t actually know the date or time, that’s why you always see the default value. Since there’s no real time clock built in there isn’t a way to set time.
I could be wrong but I think the opening artemis does have a RTC and might timestamp files if you set the clock. Check the hookup guide to verify this though.
Sadly, I’m not using the Artimis. I have the OpenLog connected to Serial2 on a Teensy 3.2.
The Teensy 3.2 has the correct crystal, and battery, for the built in RTC.
I have access to the date and time on the Teensy, and could easily pass it to the OpenLog, assuming something could be done.
I2C Qwiic openlog (dev-13712) does NOT have a call to set a date or time.
As a workaround, if this is really necessary, you could either consider adding in a sketch to set this (and read) as the first line in a file OR make a separate file with name related to the original file where you can store the different entries (e.g. timestamp-created, timestamp-last time read or timestamp-last time updated)
I like where you’re going with the first workaround.
I imagine the function would be part of the SdFat library as Sparkfun is using that library to read and write to the SD card. Is that what you’re hinting at?
Your second workaround is what I’m currently doing.
A Fat filesystem is actually storing the time and date information as part of the directory entry, not in the file itself. (e.g. see https://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.htm) I was just offering ideas on how I would be looking at the workaround. Good to see we have similar ideas
@paulvha, yes the date created time stamp, in red below, is what I’m interested in updating. BTW, your link didn’t work for me.
LOG00009.TXT 1/1/2000 12:00 Text Document 48 KB
hmm… weird… the link does not work for me either although I had just copied ( https://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html)
else just look on FAT filesystem in google