How To: Change Timezone in Linux/Unix
In a linux/unix system, the time is the number of seconds elapsed since midnight UTC on the morning of January 1, 1970, not counting leap seconds.
There are different ways and procedures to change timezones in different flavors of linux/unix (which i will explain later in this HowTo) but universal procedure to do it in all flavors is explained below:
Using /etc/localtime to set timezone:
This is the file which sets the timezone of your system. Usually it is the symbolic link to the original file of the timezone which are all stored in “/usr/share/zoneinfo/”.
To change the timezone with this file follow this procedure:
If you wish, backup the previous timezone configuration by copying it to a different location. Such as
Browse through the timezones given in “/usr/share/zoneinfo/” and finalize which one you would like to use. Then create a symlink of that timezone on the “/etc/” directory with name “localtime“
For ex: if you want it to set to IST (Indian standard time) then use this command
You can verify the same using “date” command
Wed Feb 24 22:50:50 IST 2010
If you have the utility “rdate“, update the current system time by executing
Now set the ZONE entry in the file “/etc/sysconfig/clock” file (e.g. “Asia/Calcutta”, the ZONE parameter is only evaluated by system-config-date)
After doing all this, remember to sync the hardware clock with your new timezone setting, This can be done by executing following command:
This is something by which you can change the timezone on the system level. But if you want to change a timezone to test some script, you can do it by changing your environment variable in your shell.
Remember, that in the above case, the timezone will only be changed for the same shell and will be temporary, means as soon as you logout of the shell, all you setting will be gone.
For different flavors of linux/unix you can use different commands if you don’t want to follow the above procedure:
- Redhat: “redhat-config-date” will open a dialog box –> follow the instructions.
- Centos/fedora: “system-config-date” will open a dialog box –> follow the instructions.
- Slackware/Freebsd: “tzselect” will open a dialog box –> follow the instructions.
- Ubuntu: “dpkg-reconfigure tzdata” OR “tzconfig” will open a dialog box –> follow the instructions.
In most of the above cases you will get an interface something like this.
Move to the timezone you would like to change and the simply press “OK”. This will change the timezone of your system.
Change Timezone on Linux Cellphones:
On mobile phones and other small devices that run Linux, the time zone is stored in /etc/TZ. So we need to follow the same procedure to change the timezone on cellphones and other small devices running on linux.
To setup UTC: To setup UTC timezone you need to do a simple step. Mark “UTC=true” in “/etc/sysconfig/clock” file.




[...] How To: Change Timezone in Linux/Unix From [...]
Most linuxes keep the hwclock in GMT/UTC, but a few don’t (ex: puppy, zenwalk). This is the only way to go, especially for travelers with laptops. Run ‘cat /proc/driver/rtc|head -1′ to see what the hwclock really contains.
I appreciate the work that you have put in, in this page. Really good,
[...] indican en GeekRide, para cambiar esa zona horaria tendremos que hacer lo siguiente: cd [...]
In Fedora 12, changing the time-zone is easy; you can use a graphical tool to do it too. Do the following:
(1) Right-click on the calendar applet on the top panel.
(2) Select Preferences.
(3) Click on the Locations tab.
(4) Click on the Add button to add a new city. Type the name of the city in the Location Name field; a drop-down list of choices will appear. Choose the relevant city, and click the OK button.
(5) Close the Clock Preferences dialogue.
(6) Now, left-click on the Calendar applet on the top panel. At the bottom of the window, several locations appear. An icon of a house appears next to the current city.
(7) Hover your mouse over a different city, and a Set button will appear to the right of it. Click the Set button to change the time-zone to the new city, and an authentication dialogue will appear.
(8) Enter your superuser credentials, and the time-zone changes to the new city.
Note: Superuser privileges will remain for a short time so you can select the original city without having to authenticate yourself again. If you do have to authenticate yourself again, just enter he appropriate credentials, and continue.
[...] Before starting this tutorial, let me clarify one thing that changing the time/date and changing a timezone are two different things. If you are looking for changing the Timezone then refer to this article: Change Timezone in Linux/Unix. [...]
[...] Change time/date in linux from Command Prompt Before starting this tutorial, let me clarify one thing that changing the time/date and changing a timezone are two different things. If you are looking for changing the Timezone then refer to this article: Change Timezone in Linux/Unix. [...]
How To: Change Timezone in Linux/Unix | Geek Ride – just great!
maybe have to do a
#yum update tzdata
[...] OS: (Date Change) 1. http://www.techiecorner.com/88/how-to-change-system-date-in-linux/ 2. http://www.geekride.com/howto-change-timezone-linux-unix/ 3. [...]