Friday, 7 September 2012

How to set the timezone on Ubuntu Server

You can check your current timezone by just running
$ date
Mon Sep 3 18:03:04 WEST 2012
Or checking the timezone file with:
$ cat /etc/timezone
So to change it just run
$ sudo dpkg-reconfigure tzdata
And follow on screen instructions. Easy.
Also be sure to restart cron as it won’t pick up the timezone change and will still be running on UTC.
$ /etc/init.d/cron stop
$ /etc/init.d/cron start
you might also want to install ntp to keep the correct time:
aptitude install ntp

Possibly Related Posts

No comments:

Post a Comment