This topic describes the terms and operations related to time and time zones in Linux operating systems, and describes the changes in clock configurations in some Alibaba Cloud Linux public images.
Background information
The following table describes the terms related to time and time zones in Linux operating
systems.
Term | Description |
---|---|
clock | Linux has the following clocks:
|
time standard | Linux has the following time standards:
|
Time-related operations
- Run the following command to view the time settings in the Linux operating system:
timedatectl status
A command output similar to the following one is returned. You can view the local time, UTC time, RTC time, and time zone of the Linux operating system. - Run the timedatectl command to set the time standard of the hardware clock.
- Set the time standard of the hardware clock to localtime:
If the time standard of the hardware clock is localtime, you can find that the value oftimedatectl set-local-rtc 1
RTC in local TZ
in the time settings isyes
after you run the timedatectl status command. - Set the time standard of the hardware clock to UTC:
If the time standard of the hardware clock is UTC, you can find that the value oftimedatectl set-local-rtc 0
RTC in local TZ
in the time settings isno
after you run the timedatectl status command.
- Set the time standard of the hardware clock to localtime:
Note The /etc/adjtime configuration file is used to synchronize the system clock. When you run the preceding
commands, the /etc/adjtime file is automatically updated.
Public images in which the Alibaba Cloud RTC uses the UTC time standard
By default, RTC in Alibaba Cloud public images uses the localtime standard. Note that
Alibaba Cloud has changed the localtime standard used by RTC by default to the UTC
time standard. In the following public images and their later versions, RTC uses the
UTC time standard. For more information about image releases, see the following topics: