Difference between revisions of "Timezone in RoR"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 19: Line 19:
into console. You'll see your localtime, if you still see new calls with old time, then you have to restart asterisk ([[How to restart Asterisk server]])
into console. You'll see your localtime, if you still see new calls with old time, then you have to restart asterisk ([[How to restart Asterisk server]])


Available timezones could be found in /usr/share/zoneinfo
'''Available timezones could be found in /usr/share/zoneinfo'''


You have to choose correct timezone file and copy it on top of /etc/localtime file.
You have to choose correct timezone file and copy it on top of /etc/localtime file.

Revision as of 09:09, 14 April 2011

If time is not displayed correctly in GUI and date command in SSH shows correct time, then:

  • In file /home/mor/config/environment.rb write:
ENV['TZ'] = 'Europe/Vilnius'

Off course change timezone value to correct one.

  • Restart Apache

Correct format is:

ENV['TZ'] = 'Continent/Capital'

Check time by entering

date

into console. You'll see your localtime, if you still see new calls with old time, then you have to restart asterisk (How to restart Asterisk server)

Available timezones could be found in /usr/share/zoneinfo

You have to choose correct timezone file and copy it on top of /etc/localtime file.

Example if your server is in Dublin , Europe:
cp /usr/share/zoneinfo/Europe/Dublin /etc/localtime

Then restart asterisk, if this doesn't help, restart your server.




See also