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

No timezone validation – 1994-05-03T00:00:00+100:39 #4438

Closed
p6rt opened this issue Jul 24, 2015 · 4 comments
Closed

No timezone validation – 1994-05-03T00:00:00+100:39 #4438

p6rt opened this issue Jul 24, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jul 24, 2015

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

Searchable as RT125683$

@p6rt
Copy link
Author

p6rt commented Jul 24, 2015

From @AlexDaniel

Code​:
say DateTime.new('1994-05-03T00​:00​:00+99​:99');
say DateTime.new('1994-05-03T00​:00​:00-99​:99');

Result​:
1994-05-03T00​:00​:00+100​:39
1994-05-03T00​:00​:00-100​:39

Both should produce an error. For example​:
â��hour out of range. Is​: 99, should be in 0..^24â�� â�� -12..+14 are actually
used, should we allow +20?
â��minute out of range. Is​: 99, should be in 0..^60â��.

@p6rt
Copy link
Author

p6rt commented Jul 26, 2015

From @moritz

Hi,

On Fri Jul 24 13​:34​:12 2015, alex.jakimenko@​gmail.com wrote​:

Code​:
say DateTime.new('1994-05-03T00​:00​:00+99​:99');
say DateTime.new('1994-05-03T00​:00​:00-99​:99');

Result​:
1994-05-03T00​:00​:00+100​:39
1994-05-03T00​:00​:00-100​:39

Both should produce an error. For example​:
â��hour out of range. Is​: 99, should be in 0..^24â�� â�� -12..+14 are actually
used, should we allow +20?
â��minute out of range. Is​: 99, should be in 0..^60â��.

Good catch.

In rakudo/rakudo@ed945ebc3c I've added validation for the minute, and in Raku/roast@9c46742e07 I added a test.

I don't think validating the hour does much good, so I left that part as-is.

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Jul 26, 2015

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

@p6rt p6rt closed this as completed Jul 26, 2015
@p6rt
Copy link
Author

p6rt commented Jul 26, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant