Setting up Time Zone and Enabling Network Time Sync (NTP) on Linux & Windows Cloud Servers

The NTP (Network Time Protocol) is an Internet protocol that is used to synchronize the time on your system with a centralized Network Time Protocol server. It also analyses the timestamp values including the frequency of errors and the stability.

 

ntpdiagram

 

See the instructions for setting up time zone and NTP specifically of CentOS, Debian, Ubuntu and Windows OS below.




CentOS

 

  1. Configure the system clock in CentOS server.

    # timedatectl
    
  2. Display the current time and date.

    # timedatectl status
    

    centosntp1

  3. Display all available Time zones.

    # timedatectl list-timezones
    

    centosntp2

  4. Display a particular Time zone under Asia starting with the alphabet H.

    # timedatectl list-timezones | grep  -o "Asia/H.*"
    

    centosntp3

  5. To change or set a Time zone you can use the below command. E.g. Change to Hong Kong.

    # timedatectl set-timezone Asia/Hong_Kong
    

    centosntp4

  6. To enable NTP to synchronize time with Internet time.

    # timedatectl set-ntp yes
    




Ubuntu & Debian

 

  1. Configure the system clock in Ubuntu & Debian servers.

    # timedatectl
    
  2. Display the current time and date.

    # timedatectl
    

    ubuntuntp1

  3. Display all available Time zones.

    # timedatectl list-timezones
    

    ubuntuntp2

  4. Display a particular Time zone under Asia starting with the alphabet H.

    # timedatectl list-timezones | grep  -o "Asia/H.*"
    

    ubuntuntp3

  5. To change or set a Time zone you can use the below command. E.g. Change to Hong Kong.

    # timedatectl set-timezone Asia/Hong_Kong
    

    ubuntuntp4

  6. To enable NTP to synchronize time with Internet time.

    # timedatectl set-ntp on
    




Fedora

 

  1. Configure the system clock in Fedora server.

    # timedatectl
    
  2. Display the current time and date.

    # timedatectl status
    

    fedorantp1

  3. Display all available Time zones.

    # timedatectl list-timezones
    

    fedorantp2

  4. Display a particular Time zone under Asia starting with the alphabet H.

    # timedatectl list-timezones | grep  -o "Asia/H.*"
    

    fedorantp3

  5. To change or set a Time zone you can use the below command. E.g. Change to Hong Kong.

    # timedatectl set-timezone Asia/Hong_Kong
    

    fedorantp4

  6. To enable NTP to synchronize time with Internet time.

    # timedatectl set-ntp yes
    

 

Windows OS




To configure with NTP or Internet Time:

 

  1. Right-click on the time in Taskbar and then click Adjust date/time.

  2. Click Internet Time tab, and then click Change settings….

    Timezone11

    Timezone22

  3. Check the Synchronize with an Internet time server box and select an available Internet time server from the drop-down menu.

    Timezone33

  4. Click Update now and then OK.




To change Time zone:

 

  1. Right-click on the time in Taskbar and then click Adjust date/time.

  2. Click Date and Time tab. and then click Change time zone….

    Timezone44

    Timezone55

  3. Select a needed Time zone from the drop-down menu.

    Timezone66

  4. Click OK and complete.

Was this answer helpful? 0 Users Found This Useful

Related Articles

Is a 1H 1G cloud server sufficient for personal learning?

For individual learners just starting out in server maintenance, website deployment, Linux...

How to Install WordPress with WordOps on Ubuntu

What Is WordOps? WordOps is a powerful command-line tool designed specifically for deploying and...

Automating MySQL Database Backups Using ‘Automysqlbackup’

Why Use Automysqlbackup? Automysqlbackup offers several advantages: Consistent Scheduling:...

IPv4 vs. IPv6

Internet protocol address, or IP, is a way of assigning a label to the devices on the internet....