New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In %Config, sGMTIME_max is too big. #16767
Comments
From @joeinwapCreated by @joeinwapThe valu for $Config{sGMTIME_max} is too big. That number, when #!/usr/local/bin/perl # One-liner to fond (base 2) when GMTIME stops returning dates. # Now narow it down for ($_=55.85; $_ < 55.95 ; $_+=0.01 ) { # The value in %Config is wrong $_=67767976233316804; system "uname -srvm"; ========================================== zathras> ./gmtime-test.pl 55.911454483 67768036191676799 undef perl v5.28.0 $Config{sGMTIME_max} Linux 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 Perl Info
|
From @trwyantFWIW, sGMTIME_min, sLOCALTIME_max, and sLOCALTIME_min seem also to be affected. I don't understand the "time_size.U" annotation in the docs -- on my system (Darwin) the values appear to be determined by test programs generated and run by the Configure script. |
The RT System itself - Status changed from 'new' to 'open' |
From @tonycozOn Tue, 27 Nov 2018 09:22:55 -0800, wyant wrote:
time_size.U refers to: https://github.com/perl5-metaconfig/metaconfig/blob/master/U/perl/time_size.U I'm seeing too large a value on Linux 64-bit too: tony@mars:.../git/perl$ ./perl -Ilib '-V:.*GMTIME.*' though the output there might indicate a type selection problem - time_t is 64-bits, but NV is a double (and Time64_T ends up as NV) losing some precision here (but not much it seems.) Tony |
From @craigberryOn Tue, Nov 27, 2018 at 4:41 PM Tony Cook via RT
A double was chosen as the type to hold Perl's time values since the But the min and max values determined by Configure seem to be looking |
From @joeinwapAccording to Porting/README.y2038 and Porting/timecheck.c, the The following should countdown by seconds, but jumps by eight. It's as if bits were being lost in a long int to double to long |
From @joeinwapThe precision of gmtime() at its max is 8 seconds. This is an The problem is an arbitrary constant in pp_sys.c (and t/op/time.t): ./pp_sys.c:4762:#define TIME_UPPER_BOUND 67767976233316800.0 That should be: eval { GMTIME_max . ".0" } (The fudge factor is to make sure it rounds down to a multiple of 8 The value for sGMTIME_min matches the native min of "1-Jan-0000" in the In pp_sys.c at line 4755 is this comment: There is no need for any wiggle room, the syscall will return errno=75 when |
From @LeontOn Sat, Dec 1, 2018 at 3:51 AM Joe Smith <joeinwap@gmail.com> wrote:
Which is actually an invalid date: the Gregorian calendar does not Leon |
From @joeinwapOn Sat, Dec 1, 2018 at 2:17 PM Leon Timmermans <fawaka@gmail.com> wrote:
Which means that sGMTIME_min ought to be moved forward 366 days to The values of sLOCALTIME_min and sLOCALTIME_max are unused bits of trivia |
From @tonycozOn Sat, Dec 01, 2018 at 11:44:23PM -0800, Joe Smith wrote:
sGMTIME_min and sGMTIME_max are similarly fictional, the length of Tony [1] https://www.scientificamerican.com/article/earth-rotation-summer-solstice/ [2] as a rough estimate, the rate of change will slow |
Migrated from rt.perl.org#133688 (status was 'open')
Searchable as RT133688$
The text was updated successfully, but these errors were encountered: