Is there an easy way to get a time in a particular time zone without
calling Time.zone = some_zone ?
I store events in UTC in the DB, and I also store a string
representation of the time zone as an attribute on the event.
What works is to do:
Time.zone = event.time_zone
start_time = event.start.in_time_zone
and now I have the start time in the appropriate time zone
The problem, however, is that Time.zone = event.time_zone sets it
across the whole application, as best as I can tell. And I don’t want
I could grab the Time.zone value, change it as above, then change it
back, but that’s so ugly. What would be wonderful is if there was
start_time = event.start.in_time_zone(event.time_zone)
Anything like that? Any advice? This isn’t an issue with a user’s
local time zone, but rather just trying to show a PST time as 8am PST
and an EST time as 11am EST even if both are stored as 15:00:00 (in