This project is archived and is in readonly mode.
.utc modifies time object
-
SukiSan
- No changes were found…
-
SukiSan
- Tag changed from utc time zone to utc
hurk, sorry for bad format and the useless change - I'm new here :-)
t = Time.now
=> Thu May 06 16:15:14 0200 2010t.utc
=> Thu May 06 14:15:14 UTC 2010t
=> Thu May 06 14:15:14 UTC 2010 -
ronin-18448 (at lighthouseapp)
I don't think this is a Rails problem, Time is a Ruby class. This has nothing to do with Rails if I'm right.
-
Neeraj Singh
As Simon said it is ruby that is exhibiting the behavior mentioned by Suki.
Suki: In your test the time displayed in the first case and time displayed in the third case is the same time. The only thing is that first one has time in local format and the third one is in UTC format. But the value of t has not changed the way it displays the internal data has changed.
-
SukiSan
Well, yeah sure...
The thing that actually confused me was
date = Time.local(2010, 3, 1)
date.utc
date.end_of_month.utc # == end of febEven that makes sense now. Altough it is confusing that
.utchas side effects on the object. -
Dan Pickett
- Assigned user set to Ryan Bigg
Passing to Ryan for cleanup. This is a Ruby behavior so this issue should likely be marked as "invalid" or "wontfix"
-
Ryan Bigg
- State changed from new to invalid