sparkfun / OpenLog

Open Source Hardware Datalogger
https://www.sparkfun.com/products/9530
Other
547 stars 215 forks source link

File modification date #187

Closed pg closed 9 years ago

pg commented 9 years ago

Is it possible to adjust the modification date generated for each new file on the SD card? As it is, mine always dates files as being modified on Jan 1, 2000.

thenickdude commented 9 years ago

The OpenLog doesn't have a real-time clock onboard so it can't keep time for you. But are you asking if there is an API for setting the timestamp on a file?

pg commented 9 years ago

Yes, an API would be sufficient. I'm planning to get a time sync over an Xbee connection first.

Peter

On May 18, 2015, at 6:29 AM, Nicholas Sherlock notifications@github.com wrote:

The OpenLog doesn't have a real-time clock onboard so it can't keep time for you. But are you asking if there is an API for setting the timestamp on a file?

— Reply to this email directly or view it on GitHub.

nseidle commented 9 years ago

The best way I've found is to add a GPS module (jump down to 'Main Controller Board') or an RTC and print the current date/time to the log. I then use a python script to pull out the date from the log and rename the files. Not ideal but workable.

Allowing the end user to assign a modification date is tricky. The user would send a command, then the date/time, then OpenLog would have to track it until it was power cycled. I'm afraid we don't have the room in flash to handle this amount of overhead. I'm sorry. Please re-open or comment if you think it's a must have feature.

shadimoustafa commented 5 years ago

Hi Nathan, I am looking for the same feature to add a timestamp to the log file name so I can distinguish between them as I am using the OpenLog as a black box device. Thanks