utils/SSEphem/astrtime.cc
int utc2tai (long mjd, double utc, long &tai_mjd, double &tai)
{
    tai_mjd = mjd;
    tai = utc;
    tai += get_leap_sec(mjd, utc) / 86400.0;
    if (tai >= 1.0) {
        tai -= 1.0;
        tai_mjd++;
    }
    return 1;
}
// UTC to International Atomic Time (TAI).  By definition, UTC and TAI have
// the same rate, but UTC is offset by an integer number of seconds, called
// leap seconds.  The offset is changed as needed to keep UTC within about
// 0.7 seconds of earth rotation time, UT1.  The ascii file 'leapsec.tab'
// contains the dates (MJD) when the offset changes.
//      UTC = TAI - (number of leap seconds)
// The input parameters are mjd and utc (in fraction of a day), and the
// output arguments are tai_mjd and tai (in fraction of a day).  The return
// values is 1, if successful, or 0, if not.
UTC to International Atomic Time (TAI).  By definition, UTC and TAI have
the same rate, but UTC is offset by an integer number of seconds, called
leap seconds.  The offset is changed as needed to keep UTC within about
0.7 seconds of earth rotation time, UT1.  The ascii file 'leapsec.tab'
contains the dates (MJD) when the offset changes.
UTC = TAI - (number of leap seconds)
The input parameters are mjd and utc (in fraction of a day), and the
output arguments are tai_mjd and tai (in fraction of a day).  The return
values is 1, if successful, or 0, if not.
UTC to International Atomic Time ( TAI ) . By definition UTC and TAI have the same rate but UTC is offset by an integer number of seconds called leap seconds . The offset is changed as needed to keep UTC within about 0 . 7 seconds of earth rotation time UT1 . The ascii file ' leapsec . tab ' contains the dates ( MJD ) when the offset changes . UTC = TAI - ( number of leap seconds ) The input parameters are mjd and utc ( in fraction of a day ) and the output arguments are tai_mjd and tai ( in fraction of a day ) . The return values is 1 if successful or 0 if not .
int utc2tai (long mjd, double utc, long &tai_mjd, double &tai)
{
    tai_mjd = mjd;
    tai = utc;
    tai += get_leap_sec(mjd, utc) / 86400.0;
    if (tai >= 1.0) {
        tai -= 1.0;
        tai_mjd++;
    }
    return 1;
}
int utc2tai ( long mjd , double utc , long & tai_mjd , double & tai ) { tai_mjd = mjd ; tai = utc ; tai += get_leap_sec ( mjd , utc ) / 86400.0 ; if ( tai >= 1.0 ) { tai -= 1.0 ; tai_mjd ++ ; } return 1 ; }
UTC to International Atomic Time (TAI).
UTC to International Atomic Time ( TAI ) .