Skip to content
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

Expose Leap Second Tables for Ease of Updating by Module Space #5492

Open
p6rt opened this issue Jul 27, 2016 · 1 comment
Open

Expose Leap Second Tables for Ease of Updating by Module Space #5492

p6rt opened this issue Jul 27, 2016 · 1 comment
Labels
RFC Request For Comments

Comments

@p6rt
Copy link

p6rt commented Jul 27, 2016

Migrated from rt.perl.org#128752 (status was 'new')

Searchable as RT128752$

@p6rt
Copy link
Author

p6rt commented Jul 27, 2016

From @zoffixznet

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

@p6rt p6rt added the RFC Request For Comments label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

1 participant