Skip Menu |
Report information
Id: 130123
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] Instant.from-posix is too eager with adding extra 10 seconds for TAI - UTC difference
To: rakudobug [...] perl.org
Date: Thu, 17 Nov 2016 15:50:39 -0500
From: cpan [...] zoffix.com
Download (untitled) / with headers
text/plain 1.1k
The Instant.from-posix adds leap seconds to the provided argument: <ZoffixW> m: say Instant.from-posix: 99999990 <camelia> rakudo-moar 2432c4: OUTPUT«Instant:100000002␤» And if you give low-enough values, you'll notice there's a special value of 10 seconds that's added regardless of what the given argument is: <ZoffixW> m: say Instant.from-posix: 0 <camelia> rakudo-moar 2432c4: OUTPUT«Instant:10␤» <ZoffixW> m: say Instant.from-posix: -1010 <camelia> rakudo-moar 2432c4: OUTPUT«Instant:-1000␤» <ZoffixW> m: say Instant.from-posix: 10000 <camelia> rakudo-moar 2432c4: OUTPUT«Instant:10010␤» However, it appears those 10 extra seconds are not supposed to be there prior to the start of 1972 (I've not yet found the exact moment in time). From Wikipedia's aticle on TAI[^1]: TAI is exactly 36 seconds ahead of UTC. The 36 seconds results from the *****initial difference of 10 seconds at the start of 1972*****, plus 26 leap seconds in UTC since 1972. So to me, it appears like the method must not add those extra 10 seconds for anything prior to some specific time in 1972. [1] https://en.wikipedia.org/wiki/International_Atomic_Time
Subject: Re: [perl #130123] [BUG] Instant.from-posix is too eager with adding extra 10 seconds for TAI - UTC difference
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Date: Thu, 17 Nov 2016 22:19:48 +0100
To: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.6k
Show quoted text
> On 17 Nov 2016, at 21:51, Zoffix Znet (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Zoffix Znet > # Please include the string: [perl #130123] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130123 > > > > > The Instant.from-posix adds leap seconds to the provided argument: > > <ZoffixW> m: say Instant.from-posix: 99999990 > <camelia> rakudo-moar 2432c4: OUTPUT«Instant:100000002␤» > > And if you give low-enough values, you'll notice there's a special > value of 10 seconds that's added regardless of what the given argument > is: > > <ZoffixW> m: say Instant.from-posix: 0 > <camelia> rakudo-moar 2432c4: OUTPUT«Instant:10␤» > <ZoffixW> m: say Instant.from-posix: -1010 > <camelia> rakudo-moar 2432c4: OUTPUT«Instant:-1000␤» > <ZoffixW> m: say Instant.from-posix: 10000 > <camelia> rakudo-moar 2432c4: OUTPUT«Instant:10010␤» > > However, it appears those 10 extra seconds are not supposed to be > there prior to the start of 1972 (I've not yet found the exact moment > in time). > > From Wikipedia's aticle on TAI[^1]: > > TAI is exactly 36 seconds ahead of UTC. The 36 seconds results > from the *****initial difference of 10 seconds at the start of > 1972*****, plus 26 leap seconds in UTC since 1972. > > So to me, it appears like the method must not add those extra 10 > seconds for anything prior to some specific time in 1972. > > > > [1] https://en.wikipedia.org/wiki/International_Atomic_Time
I interpret https://en.wikipedia.org/wiki/Leap_second as the current behaviour being correct (since at least 1958). Liz
Subject: Re: [perl #130123] [BUG] Instant.from-posix is too eager with adding extra 10 seconds for TAI - UTC difference
Date: Thu, 17 Nov 2016 22:20:26 +0100
To: "Zoffix Znet (via RT)" <perl6-bugs-followup [...] perl.org>
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Download (untitled) / with headers
text/plain 1.6k
Show quoted text
> On 17 Nov 2016, at 21:51, Zoffix Znet (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Zoffix Znet > # Please include the string: [perl #130123] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130123 > > > > > The Instant.from-posix adds leap seconds to the provided argument: > > <ZoffixW> m: say Instant.from-posix: 99999990 > <camelia> rakudo-moar 2432c4: OUTPUT«Instant:100000002␤» > > And if you give low-enough values, you'll notice there's a special > value of 10 seconds that's added regardless of what the given argument > is: > > <ZoffixW> m: say Instant.from-posix: 0 > <camelia> rakudo-moar 2432c4: OUTPUT«Instant:10␤» > <ZoffixW> m: say Instant.from-posix: -1010 > <camelia> rakudo-moar 2432c4: OUTPUT«Instant:-1000␤» > <ZoffixW> m: say Instant.from-posix: 10000 > <camelia> rakudo-moar 2432c4: OUTPUT«Instant:10010␤» > > However, it appears those 10 extra seconds are not supposed to be > there prior to the start of 1972 (I've not yet found the exact moment > in time). > > From Wikipedia's aticle on TAI[^1]: > > TAI is exactly 36 seconds ahead of UTC. The 36 seconds results > from the *****initial difference of 10 seconds at the start of > 1972*****, plus 26 leap seconds in UTC since 1972. > > So to me, it appears like the method must not add those extra 10 > seconds for anything prior to some specific time in 1972. > > > > [1] https://en.wikipedia.org/wiki/International_Atomic_Time
I interpret https://en.wikipedia.org/wiki/Leap_second as the current behaviour being correct (since at least 1958). Liz


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org