Scroll to navigation

MS_READLEAPSECONDS(3) Library Functions Manual MS_READLEAPSECONDS(3)

NAME

ms_readleapseconds - Read a leap second file into a global buffer

SYNOPSIS

#include <libmseed.h>
int  ms_readleapseconds ( char *envvarname );
int  ms_readleapsecondfile ( char *filename );

DESCRIPTION

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

RETURN VALUES

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.

AUTHOR

Chad Trabant
IRIS Data Management Center
2016/10/01 Libmseed API