Hello, everyone!
Today, I will show you commands and examples for displaying and setting the time on the OLT.
The next commands from 1 to 9 are for display information about time. There is much useful information about time, timezone, data, NTP (Network Time Protocol) service, etc.
Then, commands from 10 to 13 are for setting information about time. We can configure time, data, the format of date, timezone, NTP service, etc. These commands are very important during the configuration of OLT.
The command for displaying format of date
TEST(config)#display time date-format
{ <cr>||<K> }:
Command:
display time date-format
The current date display format is: YYYY-MM-DD
The command for displaying time
TEST(config)#display time
{ <cr>|date-format<K>|dst<K>|time-stamp<K>||<K> }:
Command:
display time
2021-08-08 17:55+08:00
The command for displaying timezone
TEST(config)#display timezone
{ <cr>||<K> }:
Command:
display timezone
The current time zone: GMT+08:00
The command for displaying time dst
TEST(config)#display time dst
{ <cr>||<K> }:
Command:
display time dst
Failure: DST has not been configured
The command for displaying time-stamp
TEST(config)#display time time-stamp
{ <cr>||<K> }:
Command:
display time time-stamp
Current time-stamp is: UTC(Coordinated Universal Time)
The command for displaying time-range
TEST(config)#display time-range all
{ <cr>||<K> }:
Command:
display time-range all
Current time is 2021-08-08 17:55+08:00 Monday
The command for displaying NTP service sessions
TEST(config)#display ntp-service sessions
{ <cr>|verbose<K>||<K> }:
Command:
display ntp-service sessions
clock source: X.X.0.1
clock stratum: 3
clock status: configured, master, sane, valid
reference clock ID: X.X.58.245
reach: 255
current poll: 1024
now: 101
offset: 0.1336 ms
delay: 4.52 ms
disper: 43.70 ms
The command for displaying status of NTP service
TEST(config)#display ntp-service status
{ <cr>||<K> }:
Command:
display ntp-service status
clock status: synchronized
clock stratum: 4
reference clock ID: X.X.0.1
nominal frequency: 100.0000 Hz
actual frequency: 100.0000 Hz
clock precision: 2^16
clock offset: 0.1326 ms
root delay: 9.25 ms
root dispersion: 84.96 ms
peer dispersion: 34.94 ms
reference time: 18:02:10.370 UTC Aug 8 2021(E4BA9AA2.5EC636B0)
synchronization state: clock synchronized
The command for displaying trace of NTP service
TEST(config)#display ntp-service trace
{ <cr>||<K> }:
Command:
display ntp-service trace
server X.X.0.1, stratum 4, offset 0.0001 s, synch distance 0.090
server X.X.0.1, stratum 3, offset 0.0147 s, synch distance 0.040
X.X.58.245: *Timeout*
The command for setting the format of date
TEST(config)#time date-format ?
---------------------------------------------
Command of privilege Mode:
---------------------------------------------
DD-MM-YYYY The current date display format is: DD-MM-YYYY
DD.MM.YYYY The current date display format is: DD.MM.YYYY
DD/MM/YYYY The current date display format is: DD/MM/YYYY
MM-DD-YYYY The current date display format is: MM-DD-YYYY
MM.DD.YYYY The current date display format is: MM.DD.YYYY
MM/DD/YYYY The current date display format is: MM/DD/YYYY
YYYY-MM-DD The current date display format is: YYYY-MM-DD
YYYY.MM.DD The current date display format is: YYYY.MM.DD
YYYY/MM/DD The current date display format is: YYYY/MM/DD
TEST(config)#time date-format DD-MM-YYYY
The command for configuring local time as the time-stamp
TEST(config)#time time-stamp ?
---------------------------------------------
Command of privilege Mode:
---------------------------------------------
local Set the local time as the time-stamp
utc Set UTC(Coordinated Universal Time)as the time-stamp
TEST(config)#time time-stamp local
The command for setting the time zone
TEST(config)#timezone ?
---------------------------------------------
Command of privilege Mode:
---------------------------------------------
GMT+ Set east of time zone
GMT- Set west of time zone
TEST(config)#timezone GMT+
The command for setting NTP server
TEST(config)#ntp-service unicast-server X.X.0.1
These commands were the most important commands for display and setting the time on the OLT.
Thank you!




