< Home

display clock

Function

The display clock command displays the current date and clock setting.

Format

display clock [ utc ]

Parameters

Parameter Description Value

utc

Indicates that the clock is adjusted to the Coordinated Universal Time (UTC).

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

You can run the display clock command to view the system date and clock setting and adjust the setting if necessary.

Precautions

The system clock is set using the clock datetime, clock timezone, and clock daylight-saving-time commands.

  • If the three commands are not used, the original system clock is displayed after you run the display clock command.
  • You can use any combination of the three commands to configure the system time. Table 1 lists the formats of the configured time.
The table assumes that the original system time is 08:00:00 on January 1, 2010.
  • 1: indicates that the clock datetime command is used, in which the current time and date is date-time.
  • 2: indicates that the clock timezone command is used, in which the time zone parameter is set and the time offset is zone-offset.
  • 3: indicates that the clock daylight-saving-time command is used, in which the DST parameters are set and the time offset is offset.
  • [1]: indicates that the clock datetime command is optional.
Table 1 System clock setting examples

Action

System Time Configuration

Example

1

date-time

Command: clock datetime 8:0:0 2011-11-12

Configured system time:

2011-11-12 08:00:06
Saturday
Time Zone(DefaultZoneName) : UTC

2

Original system time ± zone-offset

Command: clock timezone BJ add 8

Configured system time:

2010-01-01 16:00:30+08:00
Friday
Time Zone(BJ) : UTC+08:00

1, 2

date-time ± zone-offset

Commands: clock datetime 8:0:0 2011-11-12 and clock timezone BJ add 8

Configured system time:

2011-11-12 16:00:10+08:00
Saturday
Time Zone(BJ) : UTC+08:00

[1], 2, 1

date-time

Commands: clock timezone NJ add 8 and clock datetime 9:0:0 2011-11-12

Configured system time:

2011-11-12 09:00:07+08:00
Saturday
Time Zone(NJ) : UTC+08:00 

3

If the original system time is not in the DST segment, the original system time is displayed.

Command: clock daylight-saving-time BJ one-year 6:0 2011-8-1 6:0 2011-10-01 1

Configured system time:

2010-01-01 08:00:16
Friday
Time Zone(DefaultZoneName) : UTC
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 08-01 06:00:00
         End time    : 10-01 06:00:00
         Saving time : 01:00:00

If the original system time is in the DST segment, the configured system time is the original system time plus offset.

Command: clock daylight-saving-time BJ one-year 6:0 2010-1-1 6:0 2010-9-1 2

Configured system time:

2010-01-01 10:00:26+02:00 DST
Friday
Time Zone(BJ) : UTC
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2010
         End year    : 2010
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

1, 3

If date-time is not in the DST segment, the configured system time is date-time.

Commands: clock datetime 9:0:0 2011-11-12 and clock daylight-saving-time BJ one-year 6:0 2012-8-1 6:0 2012-10-01 1

Configured system time:

2011-11-12 09:00:26
Saturday
Time Zone(DefaultZoneName) : UTC
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 08-01 06:00:00
         End time    : 10-01 06:00:00
         Saving time : 01:00:00 

If date-time is in the DST segment, the configured system time is date-time+offset.

Commands: clock datetime 9:0:0 2011-11-12 and clock daylight-saving-time BJ one-year 9:0 2011-11-12 6:0 2011-12-01 2

Configured system time:

2011-11-12 11:02:21 DST
Saturday
Time Zone(BJ) : UTC
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 11-12 09:00:00
         End time    : 12-01 06:00:00
         Saving time : 02:00:00  

[1], 3, 1

If date-time is not in the DST segment, the configured system time is date-time.

Commands: clock daylight-saving-time BJ one-year 6:0 2012-8-1 6:0 2012-10-01 1 and clock datetime 9:0 2011-11-12

Configured system time:

2011-11-12 09:00:02
Saturday
Time Zone(DefaultZoneName) : UTC
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 08-01 06:00:00
         End time    : 10-01 06:00:00
         Saving time : 01:00:00 

If date-time is in the DST segment, the configured system time is date-time.

Commands: clock daylight-saving-time BJ one-year 1:0 2011-1-1 1:0 2011-9-1 2 and clock datetime 3:0 2011-1-1

Configured system time:

2011-01-01 03:00:19 DST
Saturday
Time Zone(BJ) : UTC
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 01-01 01:00:00
         End time    : 09-01 01:00:00
         Saving time : 02:00:00

2, 3 or 3, 2

If the result of original system time ± zone-offset is not in the DST segment, the configured system time is equal to the original system time ± zone-offset.

Commands: clock timezone BJ add 8 and clock daylight-saving-time BJ one-year 6:0 2011-1-1 6:0 2011-9-1 2

Configured system time:

2010-01-01 16:01:29+08:00
Friday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

If the result of original system time ± zone-offset is in the DST segment, the configured system time is equal to the original system time ± zone-offset ± offset.

Commands: clock daylight-saving-time BJ one-year 1:0 2010-1-1 1:0 2010-9-1 2 and clock timezone BJ add 8

Configured system time:

2010-01-01 18:05:31+08:00 DST
Friday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2010
         End year    : 2010
         Start time  : 01-01 01:00:00
         End time    : 09-01 01:00:00
         Saving time : 02:00:00

1, 2, 3 or 1, 3, 2

If the value of date-time ± zone-offset is not in the DST segment, the configured system time is equal to date-time ± zone-offset.

Commands: clock datetime 8:0:0 2011-11-12, clock timezone BJ add 8, and clock daylight-saving-time BJ one-year 6:0 2012-1-1 6:0 2012-9-1 2

Configured system time:

2011-11-12 08:01:40+08:00
Saturday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

If the value of date-time ± zone-offset is in the DST segment, the configured system time is equal to date-time ± zone-offset + offset.

Commands: clock datetime 8:0:0 2011-1-1, clock daylight-saving-time BJ one-year 6:0 2011-1-1 6:0 2011-9-1 2 and clock timezone BJ add 8

Configured system time:

2011-01-01 10:00:43+08:00 DST
Saturday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

[1], 2, 3, 1 or [1], 3, 2, 1

If date-time is not in the DST segment, the configured system time is date-time.

Commands: clock daylight-saving-time BJ one-year 6:0 2012-1-1 6:0 2012-9-1 2, clock timezone BJ add 8, and clock datetime 8:0:0 2011-11-12

Configured system time:

2011-11-12 08:00:03+08:00
Saturday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

If date-time is in the DST segment, the configured system time is date-time.

Commands: clock timezone BJ add 8, clock daylight-saving-time BJ one-year 1:0 2011-1-1 1:0 2011-9-1 2, and clock datetime 3:0:0 2011-1-1

Configured system time:

2011-01-01 03:00:03+08:00 DST
Saturday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 01-01 01:00:00
         End time    : 09-01 01:00:00
         Saving time : 02:00:00

Example

# Display the current system date and time.

<HUAWEI> display clock
2013-02-07 15:34:02+08:00
Thursday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2013
         End year    : 2013
         Start time  : 06-01 00:00:00
         End time    : 09-01 00:00:00
         Saving time : 02:00:00 

# Display the UTC of the system.

<HUAWEI> display clock utc
2012-04-23 15:11:20
Monday 
Table 2 Description of the display clock command output

Item

Description

Time Zone

Time zone.

Daylight saving time

DST.

Name

DST name.

Repeat mode

DST mode.
  • one-year: absolute DST
  • repeat: periodic DST

Start year

Year from which DST starts.

End year

Year when DST ends.

Start time

Time when DST starts.

End time

Time when DST ends.

Saving time

Storage time.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >