First draft of the Y2038 design document

Paul Eggert eggert@cs.ucla.edu
Tue Oct 27 03:22:00 GMT 2015


Albert ARIBAUD wrote:

> Y2038 proofness means that application calls to glibc-provided function should never return wrong results when times beyond 2038-01-19 03:14:07 UTC are involved.

This isn't quite right for two reasons. First, if leap seconds are in use the 
broken-down UTC cutoff time is slightly different. Second, results should also 
work for time_t values before - 2**31, as well as for time_t values after 2**31 
- 1. I suggest rewording this to talk about time_t values outside the usual 
signed 32-bit range. Similarly for the other references to absolute time stamps; 
if you're going to use examples like 2038-01-19 03:14:07 UTC, specify that the 
examples assume no leap seconds.

I agree with Joseph, by the way; there's no need for _TIME64_SOURCE, and that 
_TIME_BITS=64 should suffice.

> 32-bit time functions will not be modified

The interface won't be modified, but it's OK if the implementation is changed. 
For example, it should be OK to change the 32-bit implementation of 
clock_gettime to be a wrapper around a 64-bit implementation.



More information about the Libc-alpha mailing list