This is another one of those “I know this, but I can never remember how” type things.
I’m currently reconfiguring a machine on the other side of the globe, so I want to get it to work to IST instead of EST.
A quick google brought up a rather complex way of doing it which sounded really wrong to me, so I refined my query and found the sane solution in the Ubuntu documentation.
Simply run the following command as root (or using “su”):
dpkg-reconfigure tzdata
And just follow the instructions.
No silly reboots or other craziness required.
To keep your server's time in sync with the rest of civilisation setup a cronjob to poll an ntp server once every 24 hours:
/usr/sbin/ntpdate yourfavouritentpserveraddress
Problem solved 🙂
Steve Burke says
tzconfig does the job too.
Donncha O Caoimh says
Nice tip. Last time I did that I went editing files in /etc/
Michele Neylon says
@Steve – I’d forgotten about that option
@Donncha – that would fall into the “in”sane type of solution in my book 🙂
Rahood says
“To keep your server’s time in sync with the rest of civilisation setup a cronjob to poll an ntp server once every 24 hours:”
The Tardis hurt Trinity hard in that we had to push those requests off into /null
Have a look at
/etc/ntp.conf
Ubuntu knows about this …you are not the 1st.
http://www.pool.ntp.org/
Take your pick