NASA Logo, National Aeronautics and Space Administration
SPDF

More FAQ

1. How do I know if I have/use the latest leap second table?

The CDF accesses the leap second table in two ways: if the environment variable CDF_LEAPSECONDSTABLE (CDF_LEAPSECONDSTABLE for VMS) is defined, it is used to point to an external text file as the leap second table. If the environment variable is not defined or points to a non-existing file, the hard-coded table embedded in the distributed CDF library is used. When a new CDF version is released, its external leap second table is identical to the hard-coded table in the library.

To find out the information about the currently installed leap second table on your system, use the following tool to show what table (externally or internally) is being used and when the latest leap second is added:

  • Unix/Windows: run the command-line tool: cdfleapsecondsinfo as: "cdfleapsecondsinfo -nodump".
  • IDL: run "print,(cdf_leapseconds_info()).LASTUPDATED".
  • MATLAB: run "spdfcdfleapsecondsinfo('DUMP', false)".

For the latest leap second table, you can come to CDF for it: leap second table.

We have distributed a script, checkleapseconds.bat for Windows, and checkleapseconds.sh for non-Windows to check whether your currently installed table is up-to-date. This script is also available online: checkleapseconds.bat, or checkleapseconds.sh. The script downloads the latest leap second table from the CDF project and compares it with your table. It requires to run cdfleapsecondsinfo tool program and wget (distributed in our CDF package for Windows) or curl for non-Windows utility, respectively.

If the leap second table is not up-to-date, please upgrade the CDF version. Or, make sure the leap second table is updated with the latest information and the proper environment variable is set to point to it.

Please subscribe to the CDF Announcements email list to be notified of new CDF versions.