The clock daylight-saving-time command configures the time zone name, start time, and end time for daylight saving time.
The undo clock daylight-saving-time command deletes the start time and end time of the daylight saving time.
By default, the start time and end time of the daylight saving time are not configured.
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 repeat-start-time { start-weekday day-in-start-week start-month | repeat-start-date } repeat-end-time { end-weekday day-in-end-week end-month | repeat-end-date } offset [ start-year [ end-year ] ]
undo clock daylight-saving-time
| Parameter | Description | Value |
|---|---|---|
| time-zone-name | Specifies the name of the daylight saving time zone. | The value is a string of 1 to 32 case-sensitive characters without spaces. |
| one-year | Indicates the absolute daylight saving time. | - |
| start-time | Specifies the start time. | The time format is HH:MM using a 24-hour clock. HH specifies the hour, ranging from 0 to 23; MM specifies the minute, ranging from 0 to 59. If MM is not specified, its value is set to 0. You must enter at least one digit to specify HH. For example, if you enter 0, the start time is 00:00:00. |
| start-date | Specifies the start date. | The date format is YYYY-MM-DD. The value of YYYY ranges from 2000 to 2099; the value of MM ranges from 1 to 12; the value of DD ranges from 1 to 31. |
| end-time | Specifies the end time. | The time format is HH:MM and uses a 24-hour clock. HH specifies the hour, ranging from 0 to 23; MM specifies the minute, ranging from 0 to 59. If MM is not specified, its value is set to 0. You must enter at least one digit to specify HH. For example, if you enter 0, the end time is 00:00:00. |
| end-date | Specifies the end date. | The date format is YYYY-MM-DD. The value of YYYY ranges from 2000 to 2099; the value of MM ranges from 1 to 12; the value of DD ranges from 1 to 31. |
| repeating | Indicates the periodic daylight saving time. | - |
| repeat-start-time | Specifies the start time. | The time format is HH:MM using a 24-hour clock. HH specifies the hour, ranging from 0 to 23; MM specifies the minute, ranging from 0 to 59. If MM is not specified, its value is set to 0. You must enter at least one digit to specify HH. For example, if you enter 0, the start time is 00:00:00. |
| start-weekday | Specifies the start week. |
|
| day-in-start-week | Specifies the start working day. | The value can be Mon, Tue, Wed, Thu, Fri, Sat, and Sun. |
| start-month | Specifies the start month. | The value can be Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, and Dec. |
| repeat-start-date | Specifies the start date. | The date format is MM-DD. The value of MM ranges from 1 to 12; the value of DD ranges from 1 to 31. |
| repeat-end-time | Specifies the end time. | The time format is HH:MM and uses a 24-hour clock. HH specifies the hour, ranging from 0 to 23; MM specifies the minute, ranging from 0 to 59. If MM is not specified, its value is set to 0. You must enter at least one digit to specify HH. For example, if you enter 0, the end time is 00:00:00. |
| end-weekday | Specifies the end week. |
|
| day-in-end-week | Specifies the end working day. | The value can be Mon, Tue, Wed, Thu, Fri, Sat, and Sun. |
| end-month | Specifies the end month. | The value can be Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, and Dec. |
| repeat-end-date | Specifies the end date. | The date format is MM-DD. The value of MM ranges from 1 to 12; the value of DD ranges from 1 to 31. |
| offset | Specifies the time added to or deleted from the daylight saving time. | The format for this value is HH:MM, in 24-hour notation. HH specifies the hour, ranging from 0 to 23; MM specifies the minute, ranging from 0 to 59. If MM is not specified, the value is 0. You must enter at least one digit number to specify HH. The value of the offset ranges from 1 to 120, in minutes. |
| start-year | Specifies the start year. | The year format is YYYY. The value of YYYY ranges from 2000 to 2099. |
| end-year | Specifies the end year. | The year format is YYYY. The value of YYYY ranges from 2000 to 2099. |
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. At present, about 110 countries adopt DST all over the world.
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 user-specified DST; when it is time to end DST, the system time automatically returns to original time.
Configuration Impact
Follow-up Procedure
You can run the display clock command to view detailed information about the system time after daylight saving time takes effect.
Precautions
<sysname> system-view
[sysname] clock daylight-saving-time bj repeating 0 first Sun Jan 0 first Sun Apr 2 2009 2009
<sysname> system-view
[sysname] clock daylight-saving-time bj repeating 12:11 1-1 1:0 3-4 1
<sysname> system-view
[sysname] clock daylight-saving-time bj one-year 12:11 2010-10-2 1:00 2010-11-4 1