Thursday, December 17, 2020

How to Set or Change the Time Zone in Linux OS

How to change Time zone

============================


What is Time zone ?

---------------------


Time zone show the geographic region that has the same standard time. Typically the time zone is set during the installation of the operational system, but it can be easily changed after that as well.

Check the Current Time Zone

---------------------------------

#timedatectl



List of available Time zone

-------------------------------

Command : timedatectl list-timezones


# timedatectl list-timezones


Output 


......

......

......

Africa/Abidjan

Africa/Accra

Africa/Addis_Ababa

Africa/Algiers

Africa/Asmara

Africa/Bamako

Africa/Bangui

Africa/Banjul

Africa/Bissau

Africa/Blantyre

Africa/Brazzaville

Africa/Bujumbura

Africa/Cairo

Africa/Casablanca

Africa/Ceuta

Africa/Conakry

Africa/Dakar

Africa/Dar_es_Salaam

Africa/Djibouti

Africa/Douala

Africa/El_Aaiun

Africa/Freetown

Africa/Gaborone

Africa/Harare

Africa/Johannesburg

......

......

Asia/Singapore

.......

......

......



Set Time zone 

-----------------

command: timedatectl set-timezone <your_time_zone>


#timedatectl set-timezone Asia/Singapore



Verify time zone 

----------------------


#timedatectl

      Local time: Thu 2020-12-17 23:52:16 +08

  Universal time: Thu 2020-12-17 15:52:16 UTC

        RTC time: Thu 2020-12-17 15:52:15

       Time zone: Asia/Singapore (+08, +0800)

     NTP enabled: yes

NTP synchronized: yes

 RTC in local TZ: no

      DST active: n/a


#date 

Thu Dec 17 23:51:50 +08 2020



Note : After Time zone change need to restart crontab service or if possible take system reboot as best practice.


 

No comments:

Post a Comment