NTP, Clock and Time Zones
clock set <hh:mm:ss> [<yyyy/mm/dd>] Sets the time and date. |
||
Syntax Description |
hh:mm:ss |
Time |
yyyy/mm/dd |
Date |
|
Default |
N/A |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show clock |
|
Notes |
If not specified, the date will be left as is |
clock timezone [<zone word> [<zone word> [<zone word>] [<zone word>]]] Sets the system time zone. The time zone may be specified in one of three ways:
The no form of the command resets time zone to its default (GMT). |
||
Syntax Description |
zone word |
The possible forms this could take include: continent, city, continent, country, city, continent, region, country, city, ocean, and/or island. |
Default |
GMT |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show clock |
|
Notes |
If not specified, the date will be left as is |
ntp {disable | enable | {peer | server} <ip-address> [version <number> | disable]} Configures NTP. |
||
Syntax Description |
disable |
Disables NTP |
enable |
Enables NTP |
|
peer | server |
Configures an NTP peer or server node |
|
ip-address |
IPv4 address |
|
version |
Specifies the NTP version number of this peer. Possible values are 3 or 4. |
|
Default |
NTP is enabled |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show ntp |
|
Notes |
ntpdate <ip-address> Sets the system clock using the specified SNTP server. |
||
Syntax Description |
ip-address |
IP address |
Default |
N/A |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show ntp |
|
Notes |
This is a one-time operation and does not cause the clock to be kept in sync on an ongoing basis. It will generate an error if SNTP is enabled since the socket it requires will already be in use. |
show clock Displays the current system time, date and time zone. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
Any configuration mode |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
clock set |
|
Notes |
show ntp Displays the current NTP settings. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
Any configuration mode |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
ntp |
|
Notes |