I'm new to Ruby and have been pulling my hair out trying to figure out
an issue with displaying DateTime fields. I have programmed a very
simple app in Windows with a MySQL 5 database. The DateTime fields
appear to be saved in a UTC format. When displaying DateTime
information with the following -
<%=h evt.start_time.to_time %>
I see the following output (on Windows)
2008-10-31 03:00:00 -0700
In the database the value of the start_time field is - 2008-10-31
10:00:00. It appears "evt.start_time.to_time" is displaying DateTime
in localtime (MST).
However, the same code on my LINUX (CentOS 5) box yields the following
output -
2008-10-31 10:00:00 UTC
What am I missing? I've verified time, timezone and NTP settings on
the LINUX box.
I have the following setup in my environment.rb -
config.time_zone = 'Arizona'
I'm at a complete loss. Any help would be greatly appreciated.