Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Timing and Synchronization Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configure Date and Time Locally

date_range 20-Dec-24

You can set the date and time on a device running Junos OS by using the set date operational mode command:

To enter the date and time locally:

  1. From operational mode, manually set the date and time.

    Because this is an operational-mode command, there is no need to perform a commit operation.

    content_copy zoom_out_map
    user@host> set date YYYYMMDDhhmm.ss

    For example:

    content_copy zoom_out_map
    user@host> set date 201307251632
    Thu Jul 25 16:32:00 PDT 2013
  2. Verify the time.

    The show system uptime command provides the following information: current time, last boot time, protocols start time, last configuration commit time.

    content_copy zoom_out_map
    user@host> show system uptime
    Current time: 2013-07-25 16:33:38 PDT
    System booted: 2013-07-11 17:14:25 PDT (1w6d 23:19 ago)
    Protocols started: 2013-07-11 17:16:35 PDT (1w6d 23:17 ago)
    Last configured: 2013-07-23 12:32:42 PDT (2d 04:00 ago) by user
     4:33PM  up 13 days, 23:19, 1 user, load averages: 0.00, 0.01, 0.00

You can use the set date command from operational mode to instruct the device to retrieve the date and time from a configured NTP server. For example:

  • From operational mode, issue the set date command and specify ntp to retrieve the date and time from a configured NTP server, or specify ntp ntp-server to retrieve the date and time from the given NTP server.

    content_copy zoom_out_map
    user@host> set date ntp ntp-server

    For example:

    content_copy zoom_out_map
    user@host> set date ntp
     25 Jun 16:38:28 ntpdate[2314]: step time server 192.0.2.1 offset -0.004182 sec
footer-navigation