clock daylight-saving-time
Function
The clock daylight-saving-time command sets the name, start time, and end time of the daylight saving time (DST).
The undo clock daylight-saving-time command cancels the DST settings.
By default, the DST is not used.
Format
clock daylight-saving-time time-zone-name one-year start-time start-date end-time end-date offset
clock daylight-saving-time time-zone-name repeating start-time { { first | second | third | fourth | last } weekday month | start-date1 } end-time { { first | second | third | fourth | last } weekday month | end-date1 } offset [ start-year [ end-year ] ]
undo clock daylight-saving-time
Parameters
Parameter | Description | Value |
---|---|---|
time-zone-name | Specifies the name of the DST zone. | The value is a string of 1 to 32 characters. |
one-year | Specifies the absolute DST. | - |
repeating | Specifies the periodic DST. | - |
start-time | Specifies the start time of the DST. | The start time is in the 24-hour format HH:MM. HH specifies the hour, which is an integer ranging from 0 to 23. MM specifies the minute, which is an integer ranging from 0 to 59. If MM is not specified, the DST starts on the hour. You must enter at least one digit to specify HH. For example, when you enter 0, the start time is 00:00. |
start-date | Specifies the start date of the DST. | The start date is in the format YYYY-MM-DD. The value of YYYY ranges from 2000 to 2030, the value of MM ranges from 1 to 12, and the value of DD ranges from 1 to 31. |
end-time | Specifies the end time of the DST. | The start time is in the 24-hour format HH:MM. HH specifies the hour, which is an integer ranging from 0 to 23. MM specifies the minute, which is an integer ranging from 0 to 59. If MM is not specified, the DST starts on the hour. You must enter at least one digit to specify HH. For example, when you enter 0, the start time is 00:00. |
end-date | Specifies the end date of the DST. | The end date is in the format YYYY-MM-DD. The value of YYYY ranges from 2000 to 2030, the value of MM ranges from 1 to 12, and the value of DD ranges from 1 to 31. |
first | Specifies the first workday in a month. | - |
second | Specifies the second workday in a month. | - |
third | Specifies the third workday in a month. | - |
fourth | indicates the fourth workday in a month. | - |
last | Specifies the last workday in a month. | - |
weekday | Specifies a day of the week. | The value is Mon, Tue, Wed, Thu, Fri, Sat, or Sun. |
month | Specifies a month. | The value is Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec. |
start-date1 | Specifies the start date of the DST. | The start date is in the format MM-DD. The value of MM ranges from 1 to 12, and the value of DD ranges from 1 to 31. |
end-date1 | Specifies the end date of the DST. | The end date is in the format MM-DD. The value of MM ranges from 1 to 12, and the value of DD ranges from 1 to 31. |
offset | Specifies the DST offset. | The offset is in the 24-hour format HH:MM. HH specifies the hour, which is an integer ranging
from 0 to 2. MM specifies the minute, which is
an integer ranging from 0 to 59. If MM is not specified,
the offset is the specified hours. You must enter at least one digit
to specify HH. The offset should be shorter than or equal to 2 hours. |
start-year | Specifies the start year. | The value is in the format YYYY and ranges from 2000 to 2030. |
end-year | Specifies the end year. | The value is in the format YYYY and ranges from 2000 to 2030. |
Usage Guidelines
Usage Scenario
Daylight Saving Time (DST), also referred to as summer time, is a convention established by people for saving resources. In high latitude areas, it is earlier in summer than in winter at sunrise. To reduce evening usage of incandescent lighting and save energy, clocks are adjusted forward one hour.
Users can customize the DST zone according to their countries' or regions' convention. In addition, users can set how long clocks are adjusted forward, usually an hour. With DST enabled, when it is time to start DST, the system time is adjusted according to the user-specified DST. When it is time to end DST, the system time automatically returns to original time.
Configuration Impact
- The time in logs and debugging information uses the local time adjusted based on the time zone and the configured DST.
- The time in the output of the display commands uses the local time adjusted based on the time zone and the configured DST.
- If the DST already takes effect when you remove the configurations, the device will adjust its clock by subtracting the value of the offset parameter from the current time.
- If the DST does not take effect, removing the configurations will not affect the system time.
Precautions
The DST is configured in the summer. The DST duration ranges from one day to one year.
You can configure the start time and end time for periodic DST in one of the following modes: date+date, week+week, date+week, and week+date.
- This configuration is not reset after the reset factory-configuration command is executed.
Example
<AC6605> clock daylight-saving-time bj repeating 0 first sun jan 0 first sun apr 2 2009 2009
<AC6605> clock daylight-saving-time bj repeating 12:11 1-1 1:0 3-4 1
<AC6605> clock daylight-saving-time bj one-year 12:11 2010-10-2 1:00 2010-11-4 1