You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code:
say DateTime.new('1994-05-03T12:00:00Z').later(days => 536106030).perl; # OK
say DateTime.new('1994-05-03T12:00:00Z').later(days => 536106031).perl; #
Boom!
Result:
DateTime.new(year => 1469802, month => 10, day => 17, hour => 12, minute =>
0, second => 0)
month out of range. Is: 7017915, should be in 1..12
in block <unit> at ./test.pl:3
Please note that there is the same problem with negative offsets:
Code:
say DateTime.new('2015-12-24T12:23:00Z').later(days => -537643698); # OK
say DateTime.new('2015-12-24T12:23:00Z').later(days => -537643699); # Boom!
Result:
-1470003-07-13T12:23:00Z
month out of range. Is: -7017910, should be in 1..12
in block <unit> at ./test.pl:3
Migrated from rt.perl.org#125686 (status was 'resolved')
Searchable as RT125686$
The text was updated successfully, but these errors were encountered: