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

DateTime does not follow ISO 8601 entierly #4884

Closed
p6rt opened this issue Dec 17, 2015 · 6 comments
Closed

DateTime does not follow ISO 8601 entierly #4884

p6rt opened this issue Dec 17, 2015 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 17, 2015

Migrated from rt.perl.org#126948 (status was 'resolved')

Searchable as RT126948$

@p6rt
Copy link
Author

p6rt commented Dec 17, 2015

From @Skarsnik

I work with a webservice (Discord) that provide timestamp in the ISO 8601 format.
The issue is that DateTime can't create an object from a timestamp string because it does not follow the ISO totally.

skarsnik@​piko​:~/perl6-discord$ perl6 -e 'DateTime.new("2015-12-11T20​:41​:10.562000+00​:00")'
Invalid DateTime string '2015-12-11T20​:41​:10.562000+00​:00'; use an ISO 8601 timestamp (yyyy-mm-ddThh​:mm​:ssZ or yyyy-mm-ddThh​:mm​:ss+01​:00) instead
  in block <unit> at -e​:1

skarsnik@​piko​:~/perl6-discord$

According to https://en.wikipedia.org/wiki/ISO_8601#Times (the last paragraph) it allows extra precision on the lowest order time element. (the 10.56200 part for this example)

@p6rt
Copy link
Author

p6rt commented Dec 22, 2015

From @Skarsnik

Le Jeu 17 Déc 2015 07​:05​:50, scolinet@​gmail.com a écrit :

I work with a webservice (Discord) that provide timestamp in the ISO
8601 format.
The issue is that DateTime can't create an object from a timestamp
string because it does not follow the ISO totally.

skarsnik@​piko​:~/perl6-discord$ perl6 -e 'DateTime.new("2015-12-
11T20​:41​:10.562000+00​:00")'
Invalid DateTime string '2015-12-11T20​:41​:10.562000+00​:00'; use an ISO
8601 timestamp (yyyy-mm-ddThh​:mm​:ssZ or yyyy-mm-ddThh​:mm​:ss+01​:00)
instead
in block <unit> at -e​:1

skarsnik@​piko​:~/perl6-discord$

According to https://en.wikipedia.org/wiki/ISO_8601#Times (the last
paragraph) it allows extra precision on the lowest order time element.
(the 10.56200 part for this example)

I leave this RT open, even if there is a support for it, but It does not follow the ISO totaly and the display is not recommanded

@p6rt
Copy link
Author

p6rt commented Apr 8, 2016

From @labster

On Tue Dec 22 11​:13​:27 2015, scolinet@​gmail.com wrote​:

I leave this RT open, even if there is a support for it, but It does
not follow the ISO totaly and the display is not recommanded

Is there else something specific that we need to change? If not, tests were added to roast with e7baf233, and this ticket is can be closed.

@p6rt
Copy link
Author

p6rt commented Apr 8, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 5, 2017

From @zoffixznet

Appears to work fine now and there are tests for it​: Raku/roast@e7baf233

Closing.

@p6rt
Copy link
Author

p6rt commented Jun 5, 2017

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 5, 2017
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant