Displaying 1 result from an estimated 1 matches for "user_tz".
Did you mean:
user_to
2005 Apr 04
0
Rails timezone problems / DST
...only 14_400 seconds from
UTC.
So if I''ve got an application where I''m saving items with created_at
in UTC (ActiveRecord::Base.default_timezone = :utc), but I want to be
able to display the created times in a user''s local time, so I''ve got
some code like (where @user_tz is an instance of Rails TimeZone)
<%= @user_tz.adjust(@item.created_at) %>
This code was working up until 2am this morning, but as of today all
of my created times are an hour off.
Another minor bug is that the Time returned from adjust() will still
report itself as being in UTC. (this cou...