How To Change Timezone in OpenVZ

1. Login to the main host node.(SSH).

2. Stop the node(container) which you want to set time.
# vzctl stop VZID

3.Set the container to have capability to change the time zone.
# vzctl set VZID –capability sys_time:on –save

4. Start the container.
# vzctl start VZID

Do it from the node
5.To Synchronize the server time you can use rdate.

#rdate -s rdate.darkorb.net&
#rdate -s tick.greyware.com

5. Login in to the container and Change your local timezone.
To find correct time zone location, do this command to search exiting timezones

# find /usr/share/zoneinfo/ | more
# mv /etc/localtime /etc/localtime_bk
# ln -s /usr/share/zoneinfo/Asia/Jakarta /etc/localtime

6. Set the date

 


Leave a comment