Required Command-Line Mode = Configure

Use the clock command to set the system’s local time, date, and time zone.

The clock command has the following syntax:

   set <hh:mm:ss> [<yyyy/mm/dd>]
   timezone <zone> [<zone word> [<zone word> [<zone word>] [<zone word>]]clock]

The following table describes the arguments for the clock command:



set <hh:mm:ss> [<yyyy/mm/dd>

Sets the time and date for the system clock. The time must be specified but the date is optional. If you do not supply a date, it remains as currently set.

timezone <zone> [<zone word> [<zone word> [<zone word>] [<zone word>]]]

Specifies the timezone for the local system clock. You can define the timezone as follows:

UTC—Enables the use of UTC, for example:
(config) # clock timezone UTC
UTC-offset—Defines the timezone as an offset from UTC with the UTC-offset argument. For example, the following command sets the timezone as eight hours earlier than UTC:
(config) # clock UTC-offset UTC-8
Location—Specifies a particular location’s timezone to use. The easiest way to do this is to build the available list of cities by adding a space and a question mark after each subsequent zone word. For example, enter (config) # clock timezone ? to see the list of available locations. Select a location and use the same question mark technique to see the next available zone words. This way, you can build out to the exact location you need. For example:
(config) # clock timezone America North United_States Pacific
(config) # clock timezone Asia Eastern Hong_Kong

Related Commands

The following table summarizes other commands related to the



Displays clock settings.

# show clock

Resets the timezone to the default (GMT).

(config) # no clock timezone