< Home

clock datetime

Function

The clock datetime command sets the current date and clock of the FW.

Format

clock datetime HH:MM:SS YYYY-MM-DD

Parameters

Parameter Description Value
HH:MM:SS Specifies the current clock. HH specifies the hour. The value is an integer ranging from 0 to 23. MM specifies the minute. The value is an integer ranging from 0 to 59. SS specifies the second. The value is an integer ranging from 0 to 59.
YYYY-MM-DD Specifies the current year, month, and date respectively. YYYY specifies the year. The value is an integer ranging from 2000 to 2037. MM specifies the month. The value is an integer ranging from 1 to 12. DD specifies the date. The value is an integer ranging from 1 to 31.

Views

User view

Default Level

3: Management level

Usage Guidelines

In a network environment that requires absolute time , the date and must be set on the FW.

The time must be set in 24-hour format. If you do not specify MM and SS, their values are set to 0. You must enter at least one digit to specify HH. For example, if you enter 0, the time is set to 00:00:00.

A four-digit number must be entered to specify the year, but single digits can be entered to specify the month and day. For example, entering 2008-2-1 is the same as entering 2008-02-01.

YYYY ranges from 1993 to 2035 for non-Huawei devices. If you use a mix of Huawei and non-Huawei devices, setting the range to 2000 to 2035 is recommended.

If the function for restarting the device at a specified time has been configured and the system time is changed to be more than 10 minutes later than the specified time, the function will be canceled.

Example

# Set the current date of the FW to 0:0:0 2009-01-01.

<sysname> clock datetime 0:0:0 2009-01-01
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >