How To Set Up Timezone and NTP Synchronization?
Time Zone Configuration
Time Zone Configuration is a critical aspect of managing system clocks on CentOS, Ubuntu, and Windows. In this guide, we will walk you through how to set up time zone and NTP synchronization on your systems to ensure accuracy.”
CentOS
You can use the following command line utility to configure the system clock in CentOS
# timedatectl
Display the current time and date
# timedatectl status
Display all available Timezones
# timedatectl list-timezones
Display a particular Timezone under Asia starting with alphabet “H”
# timedatectl list-timezones | grep -o “Asia/H.*”
To change or set a Timezone you can use the below command. Eg: Change to Hong Kong
# timedatectl set-timezone Asia/Hong_Kong
To enable NTP to synchronize time with Internet time
# timedatectl set-ntp yes
For Ubuntu & Debian
You can use the following command line utility to configure the system clock in Ubuntu & Debian servers
# timedatectl
Display the current time and date
# timedatectl
Display all available Timezones
# timedatectl list-timezones
Display a particular Timezone under Asia starting with alphabet “H”
# timedatectl list-timezones | grep -o “Asia/H.*”
To change or set a Timezone you can use the below command. Eg: Change to Hong Kong
# timedatectl set-timezone Asia/Hong_Kong
To enable NTP to synchronize time with Internet time
# timedatectl set-ntp on
For Windows
To configure with NTP or Internet Time
Right click on the time in Taskbar and then click “Adjust date/time”
Click on the “Internet Time” tab
Click on “Change settings…”
Check the “Synchronize with an Internet time server” box
Select an available Internet time server from drop down menu
Click “Update now” and then “OK”
To change Timezone
Click on the “Date and Time” tab
Click on the “Change time zone…”
Select needed Time zone from drop down menu
Click “OK”