Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

set date

Syntax

Description

Set the date and time.

Options

  • date-time—Specify date and time in one of the following formats:

    • YYYYMMDDHHMM.SS

    • month DD, YYYY HH:MM(am | pm)”

    Note:

    In Junos OS Evolved, the date and time will be set only on the node where the command is issued.

  • ntp—Configure the router to synchronize the current date and time setting with a Network Time Protocol (NTP) server.

    Note:

    In Junos OS Evolved, if the ntpd server is running, the set date ntp command fails with the following error message: error: ntpd is already running. To use this command, you must first stop the ntpd server

  • ntp-server—(Optional) Specify the IP address of one or more NTP servers.

  • key authentication-key number—(Optional) Specify a key number to authenticate the NTP server used to synchronize the date and time. You must specify the same key number used to authenticate the server configured at the [edit system ntp authentication-key number] hierarchy level.

  • servers—(Optional) Specify the IP address of one or more NTP servers.

  • source-address source-address—(Optional) Specify the source address that is used by the router to contact the remote NTP server.

Required Privilege Level

view

Sample Output

set date ntp (Junos OS)

set date ntp (Junos OS Evolved)

Release Information

Command introduced before Junos OS Release 7.4.

key option introduced in Junos OS Release 12.1R2