[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Setting a Custom Time Zone

You can update the time zone database information on JUNOS routers independently of the JUNOS operating system. This feature simplifies time zone management in JUNOS systems by allowing for future unforeseen time zone database adjustments. You can configure your router to use a custom time zone database file that you create to meet your requirements by editing an existing time zone database file.

Usage Guidelines for Setting 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. Compile the time zone archive using the zic time zone compiler, which generates tz files.
  2. Using the CLI, configure the router to enable the use of the generated tz files as follows:
  3. If the above setting is made, the following command will show the imported time zones (saved in the directory /var/db/zoneinfo/):

    Otherwise, the JUNOS default time zones are shown (saved in the directory /usr/share/zoneinfo/).

How to Import and Install Time Zone Files

To import and install time zone files, follow these steps:

  1. Download the time zone files archive and untar them to a tmp directory:

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

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

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

  4. Set the time zone and commit:
  5. Verify that the time zone change has taken effect:

[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]