Forum: Ruby on Rails to_time "time out of range"

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
andrew (Guest)
on 2007-05-05 09:53

I'm experiencing some inconsistent results between code I run in the
console and in my test/project code.

On the console this works...
>>, 12, 25).to_time
=> Fri Dec 13 14:45:52 CST 1901
>>, 12, 25).to_time
=> Mon Jan 18 21:14:07 CST 2038

The values are changed to their min and max values.

If I do the same in my test or development code, I get an exception...
ArgumentError: time out of range

Why would the conversion work on the console, but not in the other

This topic is locked and can not be replied to.