[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#523280: localtime doesn't count leap seconds near 2038



In article <[🔎] 20090409120658.GH26602@hall.aurel32.net>,
  Aurelien Jarno <aurelien@aurel32.net> writes:

>> The second after 01:59:59 EDT should be 01:00:00 EST, not
>> 01:00:24 EST.
>
> This is a problem on 32-bit machines only, because it is very close to
> 2^31 - 1.

I see.  I use a 32-bit machine (i386).

I found another problem with TZ=right/Singapore.

% TZ=right/Singapore date -d @378664209
Thu Dec 31 23:59:59 SGT 1981
% TZ=right/Singapore date -d @378664210
Fri Jan  1 00:30:10 SGT 1982

The latter should be 00:30:00 as:

% TZ=Singapore date -d @378664199
Thu Dec 31 23:59:59 SGT 1981
% TZ=Singapore date -d @378664200
Fri Jan  1 00:30:00 SGT 1982

It is not so close to 2^31 - 1.

I guess the problem is caused by the last period of zoneinfo.

% zdump -v right/Singapore|tail -4
right/Singapore  Thu Dec 31 16:29:59 1981 UTC = Thu Dec 31 23:59:59 1981 SGT isdst=0 gmtoff=27000
right/Singapore  Thu Dec 31 16:30:00 1981 UTC = Fri Jan  1 00:30:10 1982 SGT isdst=0 gmtoff=28800
right/Singapore  Mon Jan 18 03:13:43 2038 UTC = Mon Jan 18 11:14:07 2038 SGT isdst=0 gmtoff=28800
right/Singapore  Tue Jan 19 03:13:43 2038 UTC = Tue Jan 19 11:14:07 2038 SGT isdst=0 gmtoff=28800
-- 
Tanaka Akira



Reply to: