Setting the date and time
The clock set command sets the local clock date and time. Valid date and time values must be in the range between January 1, 1970 and January 19, 2038. If a time zone is not configured, the time zone defaults to Greenwich Mean Time (GMT). If an active NTP server is configured for the switch, it overrides the local time settings.
Enter the clock set CCYY-MM-DDTHH:MM:SS command.
The variables represent the following values:
- CCYY specifies the year; the valid range is 1970 through 2038.
- MM specifies the month; the valid range is 01 through 12.
- DD specifies the day; the valid range is 01 through 31.
- HH specifies the hour; the valid range is 00 through 23.
- MM specifies the minutes; the valid range is 00 through 59.
- SS specifies the seconds; the valid range is 00 through 59.
If you are in VCS mode, setting the time and date is done using the RBridge ID of the node.
Here is an example of setting and displaying the date and time in VCS mode:
switch# clock set 2013-06-06T12:15:00 rbridge-id all switch# show clock rbridge-id all: 2013-06-06 12:15:05 Etc/GMT+0