develooper Front page | perl.perl5.porters | Postings from November 2018

Re: [perl #133688] perlbug AutoReply: In %Config, sGMTIME_max is toobig.

Thread Previous
From:
Joe Smith
Date:
November 30, 2018 05:30
Subject:
Re: [perl #133688] perlbug AutoReply: In %Config, sGMTIME_max is toobig.
Message ID:
CA+PLHcG6CaiUCWqTC4RR0KO2BWQRTL1eCj1dV-bN+r2itTCV-A@mail.gmail.com
According to Porting/README.y2038 and Porting/timecheck.c, the
value sGMTIME_max in %Config is correct.  The value is legal in
C code but not in Perl.

The following should countdown by seconds, but jumps by eight.
   perl -le 'print scalar gmtime 67767976233316804-$_ for (0..59)'
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 12:00:00 2147483647
Sun Dec 29 11:59:52 2147483647
Sun Dec 29 11:59:52 2147483647
Sun Dec 29 11:59:52 2147483647
Sun Dec 29 11:59:52 2147483647
Sun Dec 29 11:59:52 2147483647
Sun Dec 29 11:59:52 2147483647
Sun Dec 29 11:59:52 2147483647
Sun Dec 29 11:59:44 2147483647
Sun Dec 29 11:59:44 2147483647
Sun Dec 29 11:59:44 2147483647
Sun Dec 29 11:59:44 2147483647
Sun Dec 29 11:59:44 2147483647
Sun Dec 29 11:59:44 2147483647
Sun Dec 29 11:59:44 2147483647
Sun Dec 29 11:59:44 2147483647
Sun Dec 29 11:59:44 2147483647
 ...

It's as if bits were being lost in a long int to double to long
int conversion.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About