1、查看当前时间
#show clock detail
*17:12:00.410 CST Tue Mar 9 1993
Time source is NTP
说明:CST 表示China Standard Time UTC+8:00 中国沿海时间(北京时间)
2、调整时间
#clock set hh:mm:ss <1-31> MONTH <1993-2035>
其中:<1-31> : Day ofthe month
<1993-2035> :Year
例:#clock set 08:50:00 29 May 2013
3、时区设置
(confg)#clock timezone WORD <-23 - 23>
其中:WORD: name of time zone
<-23 - 23>: Hours offset from UTC
属于配置,需要write
例:(config)#clock timezone CST 8
4、调整log等显示时间
service timestamps logdatetime msec localtime show-timezone
调整好后,以后查看日志的时间就比较方便了。
调整前,1w5d: %SYS-5-CONFIG_I: Configured from console byvty0
调整后,Apr 23 16:26:31.037Beijing: %SYS-5-CONFIG_I: Configured from console byvty0