|
|
Subscribe / Log in / New account

Pondering 2038

Pondering 2038

Posted Aug 15, 2013 9:49 UTC (Thu) by dlang (guest, #313)
In reply to: Pondering 2038 by keeperofdakeys
Parent article: Pondering 2038

That's defined in the spec, negative times are seconds before Jan 1 1970

time will go from
Tue, 19 Jan 2038 03:14:08 GMT
to
Fri, 13 Dec 1901 20:45:51 GMT


to post comments

Pondering 2038

Posted Aug 15, 2013 12:15 UTC (Thu) by jengelh (guest, #33263) [Link]

But is is conceivable that some code may be (ab)using (time_t)-1 or time values < 0 to mean "unset" or something.

Pondering 2038

Posted Aug 23, 2013 14:02 UTC (Fri) by BenHutchings (subscriber, #37955) [Link]

Which spec? The current SUS doesn't require any mapping for pre-1970 times or any meaning for negative time values (see section 4.15). Further, (time_t)(-1) is reserved as an error value, leading to ambiguity for 1970 - 1 second.

This is not a problem unless you want to accurately represent timestamps on files from systems older than Unix, or you try to use time_t outside of its original scope.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds