clock timezone
Function
The clock timezone command sets the local time zone.
The undo clock timezone command deletes the local time zone.
By default, the system uses Default Zone Name as the time zone name.
Parameters
Parameter | Description | Value |
---|---|---|
time-zone-name | Specifies the time zone name. | The name is a string of 1 to 32 case-sensitive characters without spaces. |
add | Specifies the offset from the UTC for the time zone specified by time-zone-name. That is, the sum of the default UTC time zone and offset is equal to the time zone specified by time-zone-name. | - |
minus | Specifies the offset from the UTC for the time zone specified by time-zone-name. That is, the remainder obtained by subtracting offset from the default UTC time zone is equal to the time zone specified by time-zone-name. | - |
offset | Specifies the offset from the UTC. | Format: HH:MM:SS
|
Usage Guidelines
Usage Scenario
The system clock is the time indicated by the system timestamp. Because the rules governing local time differ in different regions, the system clock can be configured to comply with the rules of any given region.
System clock = UTC + Time zone offset + DST offset
To ensure the normal communication between devices, set an accurate system clock. You can run the clock timezone and clock daylight-saving-time commands to set the time zone and DST offsets.
Precautions
The specified time must be in 24-hour format. If you do not specify MM and SS, their values are 0. You must enter at least one digit to specify HH. For example, when you enter 0, the time is 00:00:00.
After configuring the local time zone, run the display clock command to view the configuration. The time in logs and diagnostic information uses the local time adjusted based on the time zone and DST.
- This configuration is not reset after the reset factory-configuration command is executed.