DateTime.civil has problems with string timezones #37

Closed
cgriego opened this Issue Sep 2, 2011 · 3 comments

Comments

Projects
None yet
2 participants
@cgriego

cgriego commented Sep 2, 2011

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

This comment has been minimized.

Show comment Hide comment
@jeremyevans

jeremyevans Sep 2, 2011

Owner

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

Owner

jeremyevans commented Sep 2, 2011

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

@jeremyevans

This comment has been minimized.

Show comment Hide comment
@jeremyevans

jeremyevans Sep 2, 2011

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.

Owner

jeremyevans commented Sep 2, 2011

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

This comment has been minimized.

Show comment Hide comment
@cgriego

cgriego Sep 2, 2011

Thanks for the quick turnaround!

cgriego commented Sep 2, 2011

Thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment