# Re: [Scheme-reports] TAI epoch

Hi Shiro,

On Sun, Mar 2, 2014 at 6:15 PM, Shiro Kawai wrote:
In section 6.14, the description of current-second reads:

The value 0.0 represents midnight on January 1, 1970 TAI
(equivalent to ten seconds before midnight Universal Time)

However, according to the TAI-UTC table
it appears that TAI-UTC difference reached 10s
only after 1972.  Here's the excerpt of the table:

1966 JAN  1 =JD 2439126.5  TAI-UTC=   4.3131700 S + (MJD - 39126.) X 0.002592 S
1968 FEB  1 =JD 2439887.5  TAI-UTC=   4.2131700 S + (MJD - 39126.) X 0.002592 S
1972 JAN  1 =JD 2441317.5  TAI-UTC=  10.0       S + (MJD - 41317.) X 0.0      S
1972 JUL  1 =JD 2441499.5  TAI-UTC=  11.0       S + (MJD - 41317.) X 0.0      S
1973 JAN  1 =JD 2441683.5  TAI-UTC=  12.0       S + (MJD - 41317.) X 0.0      S

Before 1972 the formula is a bit involved, but January 1, 1970
is MJD 40587, and the TAI-UTC difference is about 8s.

I'm not very familiar in this field so it's likely that
I'm missing something.  Are there a reference I can look up
for the "ten seconds" explanation in R7RS?

Thanks for bringing this up.

The 10 seconds comes from "TAI-10," so named because when
the leap-second rule was introduced in 1972 TAI and UTC were
10 seconds apart, as you say.

The 1970-01-01 epoch comes from the original Unix epoch.  This
epoch was preserved in many TAI libraries, such as Olson's time
library (see http://cr.yp.to/proto/utctai.html), such that in TAI the
time became 1970-01-01 00:00:10.  I'm going to have to guess
here (probably someone else knows better), but I suspect the 10s
difference was simply back propagated to all earlier dates.  Likely
this has to do with the fact that as you say the formula before then
was more involved, and approximate.  Since there were no formally
defined leap seconds it may be debatable to claim the difference
was 8s apart in 1970.

Note earlier drafts of R7RS used the TAI-10 epoch, but in response
to a formal comment by Alan Watson we changed this to simply
1970-01-01 TAI:

Alan also wrote the R7RS reference implementation in Chibi