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

Time.utc can't handle hour 24 #1501

ghostganz opened this Issue Feb 11, 2014 · 1 comment


None yet
3 participants
Copy link

ghostganz commented Feb 11, 2014

I had some Rails code that broke when we went from MRI to JRuby, which I tracked down to this difference:

1.9.3-p448 :001 > Time.utc(2014, 2, 11, 24, 0)
=> 2014-02-12 00:00:00 UTC

2.1.0 :001 > Time.utc(2014, 2, 11, 24, 0)
=> 2014-02-12 00:00:00 UTC

jruby-1.7.10 :002 > Time.utc(2014, 2, 11, 24, 0)
ArgumentError: argument out of range.
from org/jruby/ `utc'

The hour 24 is apparently ok according to the ISO standards, and the time formatting in iOS happily generates them, so we see a lot of them in our requests.


This comment has been minimized.

Copy link

ratnikov commented Feb 20, 2014

Just sent out #1515 against 1.7 branch to fix this.

However do note, that it will only allow accepting 24:00:00, but not 24:00:01. However that behavior is consistent with MRI.

@jrubyci jrubyci closed this in b5b17e4 Feb 21, 2014

@enebo enebo added this to the JRuby 1.7.11 milestone Feb 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.