Update Leap Seconds File

About this task

The leap seconds file contains comprehensive information about adjustments to UTC through the insertion of leap seconds. These corrections are required to synchronize TAI with UT1, compensating for irregularities in Earth´s rotation. Since 1972, leap seconds have been introduced whenever needed so that UTC and UT1 never differ by more than 0.9 seconds.

In addition to adjustment data, the file specifies its validity period and is updated semi-annually, typically in June and December, based on updates published in IERS Bulletin C.

To maintain accuracy, the file should be reviewed twice each year, prior to June 28 and December 28, and replaced before its expiration.

The file itself includes instructions on how to read and interpret its contents, so it works as a supplement to this documentation.

Review Leap Seconds File and Check Expiration Date

Before reviewing the leap seconds file, check which file is currently configured in your system´s ts2phc instance.

Procedure

  1. List all PTP instances on your system and identify which one is running ts2phc.

    $ system ptp-instance-list
    +--------------------------------------+-----------+---------+
    | uuid                                 | name      | service |
    +--------------------------------------+-----------+---------+
    | c4422160-f5ca-4737-8237-e6f1b43c9270 | ptp-inst1 | ptp4l   |
    | d28e5de0-68c3-428c-99b0-975dde94f17b | ptp-inst2 | ptp4l   |
    | d5379d68-198e-4b3a-83e8-d861525f172f | tsinst0   | ts2phc  |
    | e460d5ef-9603-431e-ae99-3ddb03fb3fd4 | clkinst0  | clock   |
    | ee756d05-f619-4133-b9ac-e7377013e52b | phcinst0  | phc2sys |
    +--------------------------------------+-----------+---------+
    
  2. Show all the ts2phc instance parameters.

    $ system ptp-instance-show tsinst0
    +------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Property   | Value                                                                                                                                                                               |
    +------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | uuid       | d5379d68-198e-4b3a-83e8-d861525f172f                                                                                                                                                |
    | name       | tsinst0                                                                                                                                                                             |
    | service    | ts2phc                                                                                                                                                                              |
    | hostnames  | ['controller-0']                                                                                                                                                                    |
    | parameters | \{'global': ['ts2phc.nmea_serialport=/dev/gnss0', 'leapfile=/home/sysadmin/leap-seconds.list'], 'monitoring': ['holdover_seconds=200', 'locked_to_holdover_threshold_seconds=100']} |
    | created_at | 2025-12-11T22:04:08.940150+00:00                                                                                                                                                    |
    +------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    

    Look for the leapfile and copy its full path.

    If the leapfile parameter is not configured, the system defaults to the leap file included in the ISO, located at /usr/share/zoneinfo/leap-seconds.list.

  3. Run the following grep command with the full path to the leap file, then verify the expiration date in the output.

    $ grep -i "expires" /usr/share/zoneinfo/leap-seconds.list
    # File expires on 28 June 2026
    

Replace the Outdated Leap Seconds File

Leap second information can be obtained from many places, but the most trusted source is the IANA. For accuracy, it´s best to download the latest leap seconds file directly from IANA.

Once downloaded, store the file in the sysadmin’s home folder. This location is the most reliable during system startup, since it does not rely on external services or network connections to be mounted.

cd /home/sysadmin
wget https://data.iana.org/time-zones/tzdb/leap-seconds.list

In both standard and duplex systems, the leap seconds file must also be copied to the backup controller. For example, if the file is downloaded to controller-0, it needs to be copied to controller-1, and the same applies in reverse.

In a standard system, there is no need to copy the file to worker nodes, since the PTP ts2phc service does not run on them.

Use the following command if the leap seconds file was downloaded to controller-0:

scp leap-seconds.list sysadmin@controller-1:/home/sysadmin/leap-seconds.list

Make sure the path to the leap seconds file is correctly set in ts2phc. If it is pointing to a different location (for example, /usr/share/zoneinfo/leap-seconds.list), remove that parameter and update it with the correct path.

To remove the leapseconds=/usr/share/zoneinfo/leap-seconds.list configuration from the ts2phc instance tsinst0, run the following command:

system ptp-instance-parameter-delete tsinst0 leapseconds=/usr/share/zoneinfo/leap-seconds.list

To configure the /home/sysadmin/leap-seconds.list path for the same ts2phc instance (tsinst0), run the following command:

system ptp-instance-parameter-add tsinst0 leapseconds=/home/sysadmin/leap-seconds.list

Finally, restart the PTP services. Updating the leap seconds file does not require a system reboot, but the PTP services must be restarted for the changes to be applied.

Run the following command to restart all PTP services.

system ptp-instance-apply