How to set the Time Zone on Fedora Server

By default Fedora set the timezone to UTC. You can define the timezone during installation but if you like me using VPS droplet, your timezone could be wrong. Luckily it can be change easily.

Fedora store all the default timezone inside /usr/share/zoneinfo directory. From there you can list all the content to find your own timezone.

cd /usr/share/zoneinfo
ls
Africa Chile GB Indian MST PRC UTC
America CST6CDT GB-Eire Iran MST7MDT PST8PDT WET
Antarctica Cuba GMT iso3166.tab Navajo right W-SU
Arctic EET GMT0 Israel NZ ROC zone.tab
Asia Egypt GMT-0 Jamaica NZ-CHAT ROK Zulu
Atlantic Eire GMT+0 Japan Pacific Singapore
Australia EST Greenwich Kwajalein Poland Turkey
Brazil EST5EDT Hongkong Libya Portugal UCT
Canada Etc HST MET posix Universal
CET Europe Iceland Mexico posixrules US

This command will give you a list of all the top level regions. For me the top regions would be Asia.

cd Asia
ls
Aden Chita Hovd Kuching Qatar Thimbu
Almaty Choibalsan Irkutsk Kuwait Qyzylorda Thimphu
Amman Chongqing Istanbul Macao Rangoon Tokyo
Anadyr Chungking Jakarta Macau Riyadh Ujung_Pandang
Aqtau Colombo Jayapura Magadan Saigon Ulaanbaatar
Aqtobe Dacca Jerusalem Makassar Sakhalin Ulan_Bator
Ashgabat Damascus Kabul Manila Samarkand Urumqi
Ashkhabad Dhaka Kamchatka Muscat Seoul Ust-Nera
Baghdad Dili Karachi Nicosia Shanghai Vientiane
Bahrain Dubai Kashgar Novokuznetsk Singapore Vladivostok
Baku Dushanbe Kathmandu Novosibirsk Srednekolymsk Yakutsk
Bangkok Gaza Katmandu Omsk Taipei Yekaterinburg
Beirut Harbin Khandyga Oral Tashkent Yerevan
Bishkek Hebron Kolkata Phnom_Penh Tbilisi
Brunei Ho_Chi_Minh Krasnoyarsk Pontianak Tehran
Calcutta Hong_Kong Kuala_Lumpur Pyongyang Tel_Aviv

Now find the city that close to you and in your same timezone. Copy the file info /etc/localtime file.

cp Kuala_Lumpur /etc/localtime

Now let’s use date command to check if it’s work correctly.

date
Thu Aug 13 16:37:10 MYT 2015
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s