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

2019-11-20 By Aaron 3075 Views linux windows time zone NTP
1 reviews

The NTP (Network Time Protocol) is an Internet protocol which 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 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 server.

    # 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 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 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 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 needed Time zone from drop down menu.

    Timezone66

  4. Click OK and complete.

What do you think about this article?

Rate this article