|
|
Log in / Subscribe / Register

Changing the epoch

Changing the epoch

Posted May 24, 2014 10:40 UTC (Sat) by ScottMinster (subscriber, #67541)
In reply to: Changing the epoch by jzbiciak
Parent article: 2038 is closer than it seems

True, that would probably preclude setting your epoch date in the future (say to 2050 so you could span between 1982 and 2118). At the very least, there would be a time (December 31, 23:59:59) when time() would have to legitimately return -1, which is the error code.

But if the epoch date is in the recent past, that wouldn't cause any trouble for the time() function. I don't think any code would care if, for example, the time_t values in a stat structure are null. As long as they are relatively consistent and localtime() returns the correct human translation.


to post comments


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