Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

DateTime.civil has problems with string timezones #37

Closed
cgriego opened this Issue · 3 comments

2 participants

@cgriego

I think I finally have a legitimate home_run behavior bug. :) Passing strings to DateTime.civil for the zone is handled in std lib and not in home_run.

[ree-1.8.7] $ ruby -rdate -e 'puts DateTime.civil(2010, 11, 14, 22, 0, 0, "Z")'
2010-11-14T22:00:00+00:00
[ree-1.8.7] $ home_run ruby -rdate -e 'puts DateTime.civil(2010, 11, 14, 22, 0, 0, "Z")'
-e:1:in `civil': no implicit conversion to float from string (TypeError)
    from -e:1

[ree-1.8.7] $ ruby -rdate -e 'puts DateTime.civil(2010, 11, 14, 22, 0, 0, "+1000")'
2010-11-14T22:00:00+10:00
[ree-1.8.7] $ home_run ruby -rdate -e 'puts DateTime.civil(2010, 11, 14, 22, 0, 0, "+1000")'
-e:1:in `civil': no implicit conversion to float from string (TypeError)
    from -e:1
@jeremyevans
Owner

home_run certainly should be handling that if the stdlib supports it. Shouldn't be a hard fix.

@jeremyevans
Owner

I'll try to put out a new release with this fix tomorrow after I build new windows binary gems and give it wider testing. Might wait till next week if I get busy.

@cgriego

Thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.