Updating linux time

Rated 3.88/5 based on 648 customer reviews

With systemd based system you need to use the timedatectl command to set or view the current date and time.Most modern distro such as RHEL/Cent OS v.7.x , Fedora Linux, Debian, Ubuntu, Arch Linux and other systemd based system need to the timedatectl utility.While Debian prefer to keep the hardware clock in UTC (this prevents the need to change it on daylight savings and timezone changes) other systems (like Windows) by default keeps the hardware clock synchronized to local time.

Most servers are probably automatically configured to network time, but if you want to set it up for yourself, or want to change the servers that you are syncing to, here’s the quick article that shows you how to do it.

Network Time Protocol (NTP) is configured by default on Amazon Linux instances, and the system time is synchronized with a load-balanced pool of public servers on the Internet and set to the UTC time zone. Amazon Linux instances are set to the UTC (Coordinated Universal Time) time zone by default, but you may wish to change the time on an instance to the local time or to another time zone in your network.

To change the time zone on an instance Network Time Protocol (NTP) is configured by default on Amazon Linux instances; however, an instance needs access to the Internet for the standard NTP configuration to work.

You can read the man page of date, or use the example below for one possible and very useful format. Modern Debian releases (2.2 and onwards) automatically saves the system time to hardware clock on proper shutdowns, and sets the system clock from hardware clock when it boots up. The protocol used to set the time is the Network Time Protocol or NTP.

The --set argument examples below is specified in the ISO 8601 standard's extended format as YYYY-MM-DD for Year-Month-Day Of Month, and time of day HH: MM: SS using 24 hour clock. To set the time automatically you need access to an NTP server.

Leave a Reply