CLI Reference Guide-R07

Table Of Contents
Chapter 1
| Initial Switch Configuration
Setting the System Clock
– 67 –
Setting the Time
Manually
To manually set the clock to 10:30:36, July 29th, 2018, enter this command.
Console#calendar set 10 30 36 29 July 2018
Console#
To set the time zone, enter a command similar to the following.
Console(config)#clock timezone Japan hours 8 after-UTC
Console(config)#
To set the time shift for summer time, enter a command similar to the following.
Console(config)#clock summer-time SUMMER date 2 april 2013 0 0 30 june 2013 0
0
Console(config)#
To display the clock configuration settings, enter the following command.
Console#show calendar
Current Time : Jul 28 00:54:20 2015
Time Zone : Japan, 08:00
Summer Time : SUMMER, offset 60 minutes
Apr 2 2013 00:00 to Jun 30 2015 00:00
Summer Time in Effect : Yes
Console#
Configuring SNTP Setting the clock based on an SNTP server can provide more accurate clock
synchronization across network switches than manually-configured time. To
configure SNTP, set the switch as an SNTP client, and then set the polling interval,
and specify a time server as shown in the following example.
Console(config)#sntp client
Console(config)#sntp poll 60
Console(config)#sntp server 10.1.0.19
Console(config)#exit
Console#show sntp
Current Time : Apr 2 16:06:07 2013
Poll Interval : 60 seconds
Current Mode : Unicast
SNTP Status : Enabled
SNTP Server : 10.1.0.19
Current Server : 10.1.0.19
Console#