2.7. Configuring Time & Timezone

Overview

Function Introduction

If no other source of time is available, you can manually configure the time and date after the system is restarted. The time remains accurate until the next system restart. We recommend that you use manual configuration only as a last resort. If you have an outside source to which the switch can synchronize, you do not need to manually set the system clock.

Principle Description

N/A

Configuration

step 1 Enter the configure mode

Switch# configure terminal

step 2 Configuring time and timezone

Switch(config)# clock set datetime 11:30:00 10 26 2023
Switch(config)# clock set summer-time dst date 12 1 2023 02:00:00 5 31 2023 02:00:00 120

step 3 Exit the configure mode

Switch(config)# exit

step 4 Validation

Use the following command to display the information of time and date:

Switch# show clock detail
13:31:10 dst Sat Oct 26 2022
Time zone: (GMT + 03:00:00) europe+3
Summer time starts at europe+3 02:00:00 12/01/2022
Summer time ends at dst 02:00:00 05/31/2022
Summer time offset: 120 minutes

Application cases

N/A