Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

set date

 

Syntax

Release Information

Command introduced before Junos OS Release 7.4.

Description

Set the date and time.

user@host> set date ntp

Options

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

    • YYYYMMDDHHMM.SS

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

  • 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 key—Configure the key to authenticate the NTP server.

  • 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

List of Sample Output

set date ntp (Junos OS)

set date ntp (Junos OS Evolved)

Sample Output

set date ntp (Junos OS)

user@host> set date ntp

set date ntp (Junos OS Evolved)

user@host> set date ntp