Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Currently when I execute the date command from bash I get the following displayed

Thu May 17 12:21:00 IST 2012

Below is my timezone config based on executing dpkg-reconfigure tzdata

  Current default time zone: 'Europe/Dublin'
  Local time is now: Thu May 17 12:32:52 IST 2012.
  Universal Time is now: Thu May 17 11:32:52 UTC 2012.
  

Any idea how I change from IST to UTC/GMT?

share|improve this question

3 Answers 3

up vote 30 down vote accepted

Any idea how I change from IST to GMT?

To switch to UTC, simply execute sudo dpkg-reconfigure tzdata, scroll to the bottom of the Continents list and select Etc; in the second list, select UTC. If you prefer GMT instead of UTC, it's just above UTC in that list. :)

share|improve this answer
    
Thank you! Worked perfectly –  dmckenna May 18 '12 at 9:48
    
I have noticed the following odd behaviour –  dmckenna May 22 '12 at 14:59
    
Yes! I wish this was enabled by default. –  wberry Aug 22 '12 at 15:08
    
After I did what you wrote above, and changed the time zone, my server is still having the same wrong time, do I need to restart the system, or what? –  user98095 Oct 16 '12 at 17:50

Something like this?

$ date
Wed Jul 16 22:52:47 EDT 2014

$ cat /etc/timezone
America/New_York

$ sudo dpkg-reconfigure tzdata
$ service cron stop && service cron start
share|improve this answer

In the old Un*x style (SunOS, HPUX...), you can do:

ln -fs /usr/share/zoneinfo/UTC /etc/localtime

Check the contents of /usr/share/zoneinfo to get the timezone you want/need.

For instance, Irish Summer Time (IST) can be defined as

-rw-r--r-- 1 root root 3661 Mar 13 22:18 /usr/share/zoneinfo/posix/Eire

or

lrwxrwxrwx 1 root root 13 Mar 13 22:18 /usr/share/zoneinfo/Europe/Dublin -> ../posix/Eire

However, the most important is to use a proper clock reference and a ntp daemon (openntpd for instance), as timezone is only used for displaying/converting the time to strings, not to store it (whatever the timezone, difference to 01/01/1970 is everywhere the same on Earth).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.