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

Internet Assigned Numbers Authority (IANA) Time Zone

date_range 20-Dec-24

Junos OS devices use the tz database, also known as the IANA Time Zone Database to manage time zones. This database is periodically updated by IANA to reflect political and time changes. As such, you may need from time to time to update this file to ensure the Junos devices continue to accurately reflect worldwide time zones and daylight savings time intervals.

To update the IANA Time Zone Database, perform the following steps:

Import and Install Time Zone Files

The IANA Time Zone Database is maintained by the Internet Assigned Numbers Authority (IANA), which is a department of the Internet Corporation for Assigned Names and Numbers (ICANN). You can download the latest IANA Time Zone Database file from the following URL: http://www.iana.org/time-zones.

The following steps will guide you through one method of installing the file to your device. However, depending on your network access and other preferences, you may need to modify these steps.

  1. Log into the Junos device.
  2. If you are in the CLI interface, open the shell interface.
    content_copy zoom_out_map
    device@user# start shell
    
  3. Create a tz directory in the /var/tmp and navigate to that directory.
    content_copy zoom_out_map
    # mkdir /var/tmp/tz
    # cd /var/tmp/tz
    
  4. Using FTP, download the time zone files archive.
    Note:

    FTP must be enabled on your device before you can use FTP. FTP is enabled by adding the ftp statement into the [edit system services] hierarchy.

    content_copy zoom_out_map
    # ftp ftp.iana.org/tz
    # bin
    # get tzdata-latest.tar.gz
    
    Note:

    If needed, you can edit the above untarred files to create or modify the time zones.

  5. Select the names of time zone files to compile and feed them to the following script. For example, to generate northamerica and asia tz files:
    content_copy zoom_out_map
    # /usr/libexec/ui/compile-tz northamerica asia
  6. Enable the use of the generated tz files using the CLI:
    content_copy zoom_out_map
    [edit]
    # set system use-imported-time-zones
    
    [edit]
    # set system time-zone ?
    

    This should show the newly generated tz files in /var/db/zoneinfo/.

  7. Set the time zone and commit the configuration:
    content_copy zoom_out_map
    [edit]
    # set system time-zone <your-time-zone>
    # commit
  8. Verify that the time zone change has taken effect:
    content_copy zoom_out_map
    [edit]
    # run show system uptime

Configure Custom Time Zone

To use a custom time zone, follow these steps:

  1. Download a time zones archive (from a known or designated source) to the router or switch. Compile the time zone archive using the zic time zone compiler, which generates tz files.
  2. Using the CLI, configure the router or switch to enable the use of the generated tz files as follows:
    content_copy zoom_out_map
    [edit]
    user@host# set system use-imported-time-zones
  3. Display the imported time zones (saved in the directory /var/db/zoneinfo/):
    content_copy zoom_out_map
    [edit] 
    user@host# set system time-zone ?

    If you do not configure the router to use imported time zones, the Junos OS default time zones are shown (saved in the directory /usr/share/zoneinfo/).

footer-navigation