Post Reply 
[newRPL] Filesystem related date/time issues
09-22-2016, 08:13 PM (This post was last modified: 09-22-2016 08:14 PM by Claudio L..)
Post: #11
RE: [newRPL] Filesystem related date/time issues
(09-21-2016 07:43 PM)matthiaspaul Wrote:  After the September update, these three files
https://sourceforge.net/p/newrpl/sources...ritetime.c
https://sourceforge.net/p/newrpl/sources...reattime.c
https://sourceforge.net/p/newrpl/sources...cessdate.c
contain the line
Code:

  dt->tm_year = 0;
to return a default year of 1900 when the corresponding date entry in the FAT file system is all 0 (which is a special case for "undefined"). (As discussed further above, it is technically possible to independently set the month and/or the day to "undefined", but not the year, but it is probably okay to not distinguish between these cases.)

While it is not "wrong" to set this to 1900 (because, basically, it stands for "undefined"), in the context of the FAT filesystem this special date is normally
set to 1980 by convention. It might confuse users, if FAT dates given as
1980-00-00 under DOS and Windows are displayed as 1900-00-00
in newRPL. People might even search for such dates in order to identify files modified while the (PC) RTC wasn't set.

So, unless there are strong reasons to map this to 1900, I would suggest to map it to 1980 instead.
Code:

  dt->tm_year = 80;

Greetings,

Matthias

No strong reasons, I just changed it to 80 per your suggestion.

EDIT: (and I'll make sure to commit this time)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [newRPL] Filesystem related date/time issues - Claudio L. - 09-22-2016 08:13 PM



User(s) browsing this thread: 1 Guest(s)