Clock Commands Map

clock set

To change the software clock settings, use the clock set command in XR EXEC mode.

clock set hh:mm:ss {day month | month day} year

Syntax Description

hh: mm: ss

Current time in hours (24-hour format), minutes, and seconds. Colons are required between values.

day

Current day (by date) in the month.

month

Current month (by name).

year

Current year (no abbreviation). Enter a valid four-digit year.

Command Default

Clock is not set.

Command Modes

XR EXEC mode

Command History

Release Modification
Release 7.0.12

This command was introduced.

Usage Guidelines

Generally, if the system is synchronized by a valid outside timing mechanism, such as a Network Time Protocol (NTP) clock source, or if you have a networking device with calendar capability, you need not set the software clock. Use the clock set command if no other time sources are available. The time specified in this command is relative to the configured time zone.

Examples

Setting the Software Clock

This example shows how to set the software clock using the clock set command with the day month arguments first.


RP/0/RP0/CPU0:router# clock set 14:12:00 10 feb 2005
  
14:12:00.114 JST Fri Feb 10 2009
  

This example shows how to set the software clock using the clock set command with the month day arguments first.


RP/0/RP0/CPU0:router# clock set 14:38:00 feb 10 2005
  
14:38:00.069 PST Tue Feb 10 2009
  

Examples

This example shows how to display the settings of the software clock:


RP/0/RP0/CPU0:router# show clock
  
14:38:11.292 PST Tue Feb 10 2009
  

clock timezone

To set the time zone for display, use the clock timezone command in System Admin Config mode or XR Config mode. To remove the time zone setting, use the no form of this command.

clock timezone zone region

Syntax Description

zone

Name of the time zone to be displayed when standard time is in effect.

region

Sets the offset according to the region specified.

Command Default

UTC

Command Modes

System Admin Config mode

XR Config mode

Command History

Release Modification
Release 7.0.12

This command was introduced.

Usage Guidelines

This table lists common time zone acronyms used for the zone argument.

Table 1. Common Time Zone Acronyms

Acronym

Time Zone Name and UTC Offset

Europe

GMT

Greenwich Mean Time, as UTC.

BST

British Summer Time, as UTC plus 1 hour.

IST

Irish Summer Time, as UTC plus 1 hour.

WET

Western Europe Time, as UTC.

WEST

Western Europe Summer Time, as UTC plus 1 hour.

CET

Central Europe Time, as UTC plus 1 hour.

CEST

Central Europe Summer Time, as UTC plus 2 hours.

EET

Eastern Europe Time, as UTC plus 2 hours.

EEST

Eastern Europe Summer Time, as UTC plus 3 hours.

MSK

Moscow Time, as UTC plus 3 hours.

MSD

Moscow Summer Time, as UTC plus 4 hours.

United States and Canada

AST

Atlantic Standard Time, as UTC minus 4 hours.

ADT

Atlantic Daylight Time, as UTC minus 3 hours.

ET

Eastern Time, either as EST or EDT, depending on place and time of year.

EST

Eastern Standard Time, as UTC minus 5 hours.

EDT

Eastern Daylight Saving Time, as UTC minus 4 hours.

CT

Central Time, either as CST or CDT, depending on place and time of year.

CST

Central Standard Time, as UTC minus 6 hours.

CDT

Central Daylight Saving Time, as UTC minus 5 hours.

MT

Mountain Time, either as MST or MDT, depending on place and time of year.

MST

Mountain Standard Time, as UTC minus 7 hours.

MDT

Mountain Daylight Saving Time, as UTC minus 6 hours.

PT

Pacific Time, either as PST or PDT, depending on place and time of year.

PST

Pacific Standard Time, as UTC minus 8 hours.

PDT

Pacific Daylight Saving Time, as UTC minus 7 hours.

AKST

Alaska Standard Time, as UTC minus 9 hours.

AKDT

Alaska Standard Daylight Saving Time, as UTC minus 8 hours.

HST

Hawaiian Standard Time, as UTC minus 10 hours.

Australia

WST

Western Standard Time, as UTC plus 8 hours.

CST

Central Standard Time, as UTC plus 9.5 hours.

EST

Eastern Standard/Summer Time, as UTC plus 10 hours (plus 11 hours during summer time).

This table lists an alternative method for referring to time zones, in which single letters are used to refer to the time zone difference from UTC. Using this method, the letter Z is used to indicate the zero meridian, equivalent to UTC, and the letter J (Juliet) is used to refer to the local time zone. Using this method, the International Date Line is between time zones M and Y.

Table 2. Single-Letter Time Zone Designators

Letter Designator

Word Designator

Difference from UTC

Y

Yankee

UTC minus 12 hours.

X

Xray

UTC minus 11 hours.

W

Whiskey

UTC minus 10 hours.

V

Victor

UTC minus 9 hours.

U

Uniform

UTC minus 8 hours.

T

Tango

UTC minus 7 hours.

S

Sierra

UTC minus 6 hours.

R

Romeo

UTC minus 5 hours.

Q

Quebec

UTC minus 4 hours.

P

Papa

UTC minus 3 hours.

O

Oscar

UTC minus 2 hours.

N

November

UTC minus 1 hour.

Z

Zulu

Same as UTC.

A

Alpha

UTC plus 1 hour.

B

Bravo

UTC plus 2 hours.

C

Charlie

UTC plus 3 hours.

D

Delta

UTC plus 4 hours.

E

Echo

UTC plus 5 hours.

F

Foxtrot

UTC plus 6 hours.

G

Golf

UTC plus 7 hours.

H

Hotel

UTC plus 8 hours.

I

India

UTC plus 9 hours.

K

Kilo

UTC plus 10 hours.

L

Lima

UTC plus 11 hours.

M

Mike

UTC plus 12 hours.

Examples

This example shows how to set the time zone to IST Asia/Calcutta:

Router# config
Router(config)# clock timezone IST Asia/Calcutta
                     

locale country

To set the default country of use, use the locale country command in mode. To remove the country setting, use the no form of this command.

locale country country

Syntax Description

country

Country, where country is a two-character country code. Case is not important.

Command Default

No default behavior or values

Command Modes

Command History

Release Modification
Release 7.0.12

This command was introduced.

Usage Guidelines

To display a complete listing of the available country codes, use the online help ( ? ) function:


RP/0/RP0/CPU0:router(config)# locale country ?
  
    AD    Andorra
    AE    United Arab Emirates
    AF    Afghanistan
    AG    Antigua and Barbuda
    AI    Anguilla
    AL    Albania
    AM    Armenia
    AN    Netherlands Antilles
    AO    Angola
    AQ    Antarctica
    AR    Argentina
    AS    American Samoa
    AT    Austria
    AU    Australia
    AW    Aruba
    AZ    Azerbaijan
    BA    Bosnia and Herzegovina
    BB    Barbados
    BD    Bangladesh
    BE    Belgium
  --More-- 
  

Examples

The following example shows how to set the country of use to Australia:


RP/0/RP0/CPU0:router(config)# locale country au
            
         

locale language

To set the default language of use, use the locale language command in mode. To remove the language setting, use the no form of this command.

locale language language

Syntax Description

language

Two-character code that specifies the language. Case is not important.

Command Default

No default behavior or values

Command Modes

Command History

Release Modification
Release 7.0.12

This command was introduced.

Usage Guidelines

To display a complete listing of the available language codes, use the online help (?) function:


RP/0/RP0/CPU0:router(config)# locale language ?
  
aa    Afar
ab    Abkhazian
af    Afrikaans
am    Amharic
ar    Arabic
as    Assamese
ay    Aymara
  --More-- 
  

Examples

The following example shows how to set the language of use to English:


RP/0/RP0/CPU0:router(config)# locale language en
                    

show clock

To display the system clock, use the show clock command in XR EXEC mode.

show clock [detail]

Syntax Description

detail

(Optional) Indicates the time zone, time source, and current summer time setting (if any).

Command Default

No default behavior or values.

Command Modes

XR EXEC mode

Command History

Release Modification
Release 7.0.12

This command was introduced.

Usage Guidelines

The system clock keeps an “authoritative” flag that indicates whether the time is authoritative (believed to be accurate). If the system clock has been set by a timing source, such as system calendar or Network Time Protocol (NTP), the flag is set. If the time is not authoritative, it is used only for display. Until the clock is authoritative and the “authoritative” flag is set, the flag prevents peers from synchronizing to the clock when the peers have invalid times.

The leading symbols that precede the show clock command display are shown in this table

Table 3. show clock Display Leading Symbol Descriptions

Symbol

Description

*

Time is not authoritative.

(blank)

Time is authoritative.

.

Time is authoritative, but NTP is not synchronized.

Examples

The following sample output shows the current clock settings:


RP/0/RP0/CPU0:router# show clock
  
16:18:28.927 PST Tue Feb 10 2009
    

The following sample output shows the current clock detail, including the time zone and time source:


RP/0/RP0/CPU0:router# show clock detail
  
16:18:07.164 PST Tue Feb 10 2009
Timezone: PST8PST Timesource: User configured