Change Time.now on server to return different timezone
I have an app deployed on a server where the system time is 7 hours behind UTC. I'm actually in England so I want times displayed in local time GMT (with daylight saving adjusted).
A gem that I'm using, resque, uses Time.now to retrieve the current time. What do I need to configure to get Time.now to return the correct time?
The easiest way would be to set the ENV["TZ"] variable.
> Time.now => 2011-05-21 13:13:23 +0200 > ENV["TZ"] = "Europe/London" => "Europe/London" > Time.now => 2011-05-21 12:13:55 +0100