This project is archived and is in readonly mode.
time_with_datetime_fallback returns DateTime object in fallback instead of Time
-
Jeremy Kemper
- State changed from new to invalid
The rescue is used to handle Times out of range of the 32-bit epoch, not to fix invalid arguments.
-
Evgeniy Pirogov
interesting, so the method return object of different class.
why the rescue does not distinguish between "time out of range" and "argument out of range"::Time.send(:utc, 2040, 1, 1, 1, 1, 1, 0) ArgumentError: time out of range
from (irb):1:in `utc' from (irb):1:in `send' from (irb):1::Time.send(:utc, 2010, 1, 1, 24, 0, 0, 0) ArgumentError: argument out of range
from (irb):2:in `utc' from (irb):2:in `send' from (irb):232bit problem in my view is less evil, than different class.
and 32bit problem "can't be properly" solved on 32bit platform anyhow
the rails app will die before reaching this point in the code in year 2038-Jun-19 03:14:07just my 2 cents