>> Time.now
=> Mon Oct 26 15:55:20 0000 2009
>> Time.now.utc
=> Mon Oct 26 15:55:26 UTC 2009
OK, that's fine. Now let's try a calculation:
>> (Time.now - 1.day).utc
[Sun Oct 25 14:55:41 UTC 2009
What? Where did that one hour offset come from??
It turns out THAT is the source of all the specs which suddenly failed for no apparent reason this morning.
The good news is, it's easy to fix:
>> Time.now.utc - 1.day
=> Sun Oct 25 15:56:08 UTC 2009
MUCH better!
No comments:
Post a Comment