# New Ticket Created by Zoffix Znet # Please include the string: [perl #128752] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=128752 >
We currently have several issues with leap seconds and I propose we add an interface exposing Rakudo's leap second tables (http://bit.ly/2aeGlIQ) to the user to allow for, say, a module, importing which would make the leap second table current, regardless of the version of the compiler used. Issue #1: Fatality of code depends on compiler version ----------------------------------------------------------------------------- $ perl6-v2016.07 -e 'DateTime.new("2016-12-31T23:59:60"); say "lives"' lives $ perl6-v2016.06 -e 'DateTime.new("2016-12-31T23:59:60"); say "lives"' Second out of range. Is: 60, should be in 0..^60; There is no leap second on UTC 2016-12-31 in block <unit> at -e line 1 Issue #2: Different Instant.from-posix results, depending on compiler version: ----------------------------------------------------------------------------- $ perl6-v2016.07 -e 'say Instant.from-posix: 1485726595' Instant:1485726632 $ perl6-v2016.06 -e 'say Instant.from-posix: 1485726595' Instant:1485726631 Issue #3: Different DateTime.Instant results, depending on compiler version: ----------------------------------------------------------------------------- $ perl6-v2016.07 -e 'DateTime.new("2017-01-01T00:00:00").Instant.say' Instant:1483228837 $ perl6-v2016.06 -e 'say Instant.from-posix: 1485726595' Instant:1483228836 There are probably more methods I've not thought about that are similarly affected. I've mentioned this problem on IRC: http://irclog.perlgeek.de/perl6/2016-07-27#i_12918886 and so far got this response: [lizmat] all for exposing the dates / posix values but would probably not be in favour of allowing it to be added upon rather, so it can serve as a basis of a module that *does* allow adding ? -- Cheers, ZZ | https://twitter.com/zoffix
