Clock/hwclock:
Display and set the hardware clock(Query and set the hardware clock (RTC). the two commands are the same. RTC = Real Time Clock, that is, the hardware Clock.
Command parameters:
-S, -- hctosys synchronize the hardware clock to the system clock (the system time-w, -- systohc synchronize the system clock to the hardware clock (the hardware clock to the current system time)
Command example:
/Sbin // usr/sbin/~] # Ll/sbin/hwclock/usr/sbin/-rwxr-xr-x. root November:/sbin/root March:/usr/sbin/hwclock-> .. /.. /sbin/~] # Type-/sbin/~] # Ll/sbin/root March:/sbin/clock-> hwclock
-~::~]# hwclock -~]# hwclock- seconds
Synchronize Network Time To system time
. Mar :: ntpdate[]: adjust time server . offset sec
210.72.145.44(Domain Name of the official time synchronization server IP address of the Time Synchronization Center in Xi'an, China)
Synchronize the system time to the hardware time.
Modify Time Zone
Tzselect # select the time zone as prompted
[Root @ localhost ~] # Ln-sf/usr/share/zoneinfo/Asia/Shanghai/etc/localtime
Modify the system time configuration file
Restart the system
[root@localhost ~]# reboot