logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ms_readleapseconds - Read a leap second file into a global buffer

Author

       Chad Trabant
       IRIS Data Management Center

Libmseed API                                       2016/10/01                              MS_READLEAPSECONDS(3)

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

Name

       ms_readleapseconds - Read a leap second file into a global buffer

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.

Synopsis

#include<libmseed.h>intms_readleapseconds(char*envvarname);intms_readleapsecondfile(char*filename);

See Also