Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Updating the IANA Time Zone Database on Junos OS Devices

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:

Importing and Installing 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.
  3. Create a tz directory in the /var/tmp and navigate to that directory.
  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.

    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:
  6. Enable the use of the generated tz files using the CLI:

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

  7. Set the time zone and commit the configuration:
  8. Verify that the time zone change has taken effect:

Configuring a 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:
  3. Display the imported time zones (saved in the directory /var/db/zoneinfo/):

    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/).