Mar 17

Changing Server Timezone On Ubuntu

by in Linux, Open Source, Techie :: Techno ::, Ubuntu

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 :)

Related Posts:

Tags: ,

4 Responses to “Changing Server Timezone On Ubuntu”

  1. From Steve Burke:

    tzconfig does the job too.

    Posted on March 18, 2008 at 9:33 am #
  2. From Donncha O Caoimh:

    Nice tip. Last time I did that I went editing files in /etc/

    Posted on March 18, 2008 at 10:32 am #
  3. From Michele Neylon:

    @Steve – I’d forgotten about that option
    @Donncha – that would fall into the “in”sane type of solution in my book :)

    Posted on March 18, 2008 at 11:23 am #
  4. From Rahood:

    “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

    Posted on March 18, 2008 at 2:17 pm #