Ask Your Question
0

how to set time zone

asked 2015-01-14 22:21:36 -0500

eli gravatar image

time zone of my host is correct, but on the instance it is utc+0, I want it to be utc+8, how to change time zone? thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-01-15 06:37:37 -0500

The database will default to utc+0 but you can always change the time locally to reflect your time zone.

For example in Ubuntu I would use the following to set time zone to utc-6 (my time zone) for the logged in user:

export TZ="America/Chicago"

After doing this 'date' will return my local time and date -u will still return utc+0

You can find your zone info in /usr/share/zoneinfo

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-01-14 22:21:36 -0500

Seen: 3,051 times

Last updated: Jan 14 '15