---
title: System Time Configuration
slug: routing/system-time-configuration
createdAt: 2025-12-04T04:32:02.421Z
---

## <font color="#1d50a2">System Time Configuration</font>

### <font color="#1d50a2">show clock</font>

**\[Command]**
**show clock**

**\[Purpose]**
Display time zone and time

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show clock
```

### <font color="#1d50a2">show supported-timezones</font>

**\[Command]**
**show supported-timezones**

**\[Purpose]**
Display the time zones supported by the system configuration

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show supported-timezones
```

### <font color="#1d50a2">clock datetime *date\_string* *time\_string*</font>

**\[Command]**
**clock datetime *date\_string* *time\_string***

**\[Purpose]**
Configure system time

**\[Parameter]**

| **Parameter**   | **Description**               |
| --------------- | ----------------------------- |
| *date\_string*  | Date value, YY-MM-DD format   |
| *time\_string*  | Time value, HH\:MM\:SS format |

**\[View]**
System configuration view

**\[Usage Scenario]**
When preparing to deploy a device, it's essential to configure the system time of the device to the current actual time. This ensures that the device's logs and alarm messages accurately reflect the timestamp of events. The device often comes with an arbitrary system time when it leaves the factory, which doesn't represent the actual time.

**\[Use Cases]**

```plaintext
sonic# configure
sonic(config)# clock datetime 2022-02-22 20:30:30
```

### <font color="#1d50a2">clock timezone *zone*</font>

**\[Command]**
**clock timezone *zone***
**no clock timezone**

**\[Purpose]**
Configure the system time zone, the default time zone is UTC

**\[Parameter]**

| **Parameter** | **Description** |
| ------------- | --------------- |
| zone          | Timezone        |

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# configure
sonic(config)# clock timezone Asia/Shanghai
```

