This topic describes the basic concepts of time and time zones in the Linux operating system, related operations, and changes to the clock configuration in some Alibaba Cloud Linux public images.
Background information
The following table describes the basic concepts of time and time zones in the Linux operating system.
Concept | Description |
Clock | Linux has two types of clocks:
|
Time standard | Linux has two time standards:
|
Time-related operations
Run the following command to view the current time settings.
timedatectl statusThe command returns information about the local time, UTC, RTC time, and time zone, as shown in the following example.

Use the timedatectl command to set the time standard for the hardware clock.
To set the time standard of the hardware clock to localtime:
timedatectl set-local-rtc 1When the time standard of the hardware clock is localtime, the timedatectl status command shows that the value of the
RTC in local TZparameter isyes.To set the time standard of the hardware clock to UTC:
timedatectl set-local-rtc 0When the time standard of the hardware clock is UTC, the timedatectl status command shows that the value of the
RTC in local TZparameter isno.
The /etc/adjtime file is the configuration file for system clock synchronization. Because the preceding commands automatically update the /etc/adjtime file, you do not need to set it separately.
Public images that use the UTC standard for the RTC
By default, the RTC in Alibaba Cloud public images uses the localtime standard. However, in recent public images, Alibaba Cloud changed the default RTC time standard from localtime to UTC. Future versions of these images will continue to use the UTC standard for the RTC. For more information about the release of these public images, see the following documents: