clock set

Sets the local clock time and date.

Syntax

clock set hh:mm:ss mm-dd-yy/yyyy

Parameters

hh:mm:ss
Specifies the local clock time in hours, minutes, and seconds.
mm-dd-yy/yyyy
Specifies the local clock date in month, day, and year format. Year may be specified with two or four numbers.

Modes

Privileged EXEC mode

Usage Guidelines

Valid date and time settings range from January 1, 1970 to December 31, 2035.

An active NTP server, if configured, automatically updates and overrides the local clock time.

Examples

The following example sets the time and date to 31 minutes past 4 pm in the afternoon on July 28, 2016, for the local device:

device# clock set 16:31:35 07-28-16