CentOS System Time Setting Method
For linux systems, there are three ways to set the system time:
1. Take the local time as the system time;
2. the system time is based on the UTC world time partition standard;
3. Time Based on NTP time coordination server;
Three time settings are described as follows:
1. Set the local time command to clock or hwclockg. The system folder is/etc/localtime.
Command description:
Hwclock/clock-w saves the current system time as the hardware time.
Hwclock/clock -- set -- date "03/17/2009 13:26:00"
Hwclock/clock -- show Displays the current hardware time
Hwclock/clock -- hctosys hardware time synchronization is system time
Hwclock/clock-systohc system time synchronization is hardware time
2. the UTC time setting command is timeconfig. The graphic setting box on the text interface is started. Its configuration file is saved in/etc/sysconfig/clock.
3. The NTP settings must be set on the server side and on the client side. Configure the NTP server. The configuration file is/etc/ntp. conf.
After the configuration is complete, service ntpd start starts the server
Query the NTP server in the Network: ntpq-p
NTP synchronization time: ntpdate ntpserver (ip address or domain name)
--------------------
Common system time setting methods:
Date-s 12/25/2013 (December 25, 2013)
Date-s 15:55:33)
Clock-w