#include <libmseed.h> int ms_readleapseconds ( char *envvarname ); int ms_readleapsecondfile ( char *filename );
These functions read a leap seconds file and store a list of leap seconds in an internal, global list. The leap seconds are used to determine the proper end time of a record (and consquently a trace). The use of this facility causes the leap second indication in the fixed section data header to be ignored.
The ms_readleapseconds function takes and environment variable name that is expected to contain the name of a leap seconds file. The ms_readleapsecondfile function takes the name of a leap second file.
Leap Second List File
The leap second list file is expected to contain a list of leap second times and TAI-UTC difference values. The first column should be time stamps as seconds since the NTP epoch (Jan. 1 1900). The second column should be an integer number of seconds that specify the difference between TAI and UTC.
Usually the most recent version of this file is available here: https://www.ietf.org/timezones/data/leap-seconds.list
ms_readleapseconds returns the number of leap seconds read on success, -1 on file read errors and -2 when the environment variable is not set.
ms_readleapsecondfile returns the number leap seconds read on success and -1 on errors.
Chad Trabant IRIS Data Management Center
The man page ms_readleapsecondfile(3) is an alias of ms_readleapseconds(3).