When I explicitly state in my Production.rb that I want UTC with:
# Timezone Set
config.time_zone = 'UTC'
Then I log into my production machine and run the production console (machine defaults to +4 Mowscow Time).. I get the following output:
$ Time.now
=> 2012-02-04 20:52:32 +0400
$ Time.zone.now
=> Sat, 04 Feb 2012 16:52:43 UTC +00:00
The value of Time_ago_in_words is always +4 .. if I post something ‘now’.. it shows as ‘4 hours’…. that counts down to 0 after 4 hours.. then starts being negative (i.e. 1 hour ago)…. How do I get this to display correctly?
=================
After a too many hours trying to figure out how to do this.. I finally figured out just after posting this 😐 I had to run:
sudo dpkg-reconfigure tzdata
And set my timezone to UTC there.. now Time.now outputs the UTC instead of Moscow.. I’ll leave this here for anyone else that runs into this.
As suggested by those commenting, here is the solution that allowed me to get this to work:
And set my timezone to UTC there.. now Time.now outputs the UTC instead of Moscow.