Hi. Today we will look for changing the system time and prompt. You may think that what is the relation between system time and prompt, you are right there are no relation:). System time is important for network devices because logs get meaning with them and ACL, VPN time limitations work truly with them. In order to change the system time, we need to enable mod not configure but I know it is surprising. As you can see time is read from the hardware clock.
Print Date and Time
We will start by printing current date and time in the Cisco IOS device. We will use the
clock read-calender command like below.
S1#clock read-calendar S1# Sep 2 03:25:57.798: %SYS-6-CLOCKUPDATE: System clock has been updated from 07:25:57 EEST Tue Sep 2 2014 to 07:25:57 EEST Tue Sep 2 2014, configured from console by console.
Set Time and Date
We can set the date and time with the
clock set command. We will provide the clock in
HH:MM:SS format and the date
DD MM YYYY format. In this example, we will set the time as 06:28:00 and date 2 September 2015.
S1#clock set 06:28:00 2 SEPTEMBER 2015 S1# Sep 2 02:28:00.000: %SYS-6-CLOCKUPDATE: System clock has been updated from 07:28:17 EEST Tue Sep 2 2014 to 06:28:00 EEST Wed Sep 2 2015, configured from console by console.
So we set up our time but to make it work correctly trough the year we need to configure our time zone. Some times according to our time zone we need summertime. Use this web site for time zone info.
S1(config)#clock timezone EET 3 0 S1(config)#clock summer-time EEST recurring first SUNDAY MARCH 02:00 last SUNDAY OCTOBER 02:00