The tconvert and gpsclock command-line utilities, the
tconvert Tcl library package, and the C library functions
TConvertGPSToSys() and TConvertSYSToGPS(), are all designed to
automatically know about new leap seconds as they are announced. The
initial information source is the leapseconds file from an LDAS web
server (which is itself updated daily from a Navy ftp site), plus the
latest Bulletin
C of the International Earth Rotation Service. This leap-second
information is normally stored in the file $LIGOTOOLS/config/public/tcleaps.txt
along with a "valid through" time, so that future time conversions
will generally be able to get leap-second information from the disk
file rather than having to use the web. When the disk file expires,
it is automatically updated, so leap seconds should be known about
some time before they actually take effect. (Of course, if you
perform a conversion on a time several months in the future, it may
not yet be known whether there will be a leap second added in the
meantime.) It is hoped that these web files will continue to exist,
in basically the same format, for the forseeable future; if not, a
warning or error message will be printed to standard error.
You can specify another location for the tcleaps.txt file,
other than the default of $LIGOTOOLS/config/public, by
setting the environment variable TCLEAPSDIR . Also, if
$LIGOTOOLS/config/public/tcleaps.txt exists but is not
writable by you (e.g. it is on a read-only filesystem), then the code
uses $HOME/tcleaps.txt as the location.