One, time zone setting
Because UTC is used to install the system, what is UTC is that UTC is the time of the 0 time zone, which is the international standard, while China is in the utc+8 time zone.
Using the Tzselect command, the process is as follows:
You can see that this environment variable is set, write the declaration of this variable to/etc/profile, and re-import it.
Second, time setting
There are two Linux system clocks, one is the hardware clock , that is, the BIOS time, which is the time we see in CMOS setup, and the other is the system clock , which is the kernel time of the Linux system.
When Linux starts, the system kernel reads the hardware clock settings, and the system clock is independent of the hardware. Sometimes we find that the system clock is inconsistent with the hardware clock, so we need to perform time synchronization and share the command usage of time settings and clock synchronization.
System Time setting:
The date command sets the dates to June 18, 2014
# date-s 06/18/14
Set the time to 14 points, 20 minutes, 50 seconds
# date-s 14:20:50
Set the time to June 18, 2014 14:16 30 seconds (MMDDHHMMYYYY.SS)
# date 0618141614.30
Hardware Time Setting :
Viewing the system hardware clock
# Hwclock--show or
# clock--show
Set Hardware time
# Hwclock--set--date= "06/18/14 14:55" (Month/day/year: minutes: seconds) or # clock--set--date= "06/18/14 14:55" (Month/day/year: minutes: seconds)
the command that synchronizes system time and hardware time with each other :
# hwclock--hctosys Synchronize hardware time to System time (System time is synchronized)
# Hwclock--SYSTOHC synchronizes system time to hardware time (hardware time is synchronized)
Linux Time and TimeZone settings