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?
To switch to UTC, simply execute
sudo dpkg-reconfigure tzdata
, scroll to the bottom of the Continents list and selectEtc
orNone of the above
; in the second list, selectUTC
. If you prefer GMT instead of UTC, it's just above UTC in that list. :)Will change your timezone to UTC system wide.
You can do
timedatectl list-timezones
to see all the available timezones.excerpt from @MattJohnson's answer on SO
In the old Un*x style (SunOS, HPUX...), you can do:
Check the contents of /usr/share/zoneinfo to get the timezone you want/need.
For instance, Irish Summer Time (IST) can be defined as
or
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).
Updated for 14.04 to present
View Time and Date Status:
View List of Timezones:
Listed Timezones (425)
Set Timezone to UTC:
View Time and Date Status:
Something like this?
In case you need this for only a single command, say,
ls
, use this: