Associated Topics || Dr. Math Home || Search Dr. Math

### Seconds since 1980

```Date: 08/08/2002 at 09:51:06
From: Bob
Subject: Seconds since 1980

Hi there,

How can I work out the number of seconds since 1980, taking leap years
into account?

Regards,
Bob G
```

```
Date: 08/08/2002 at 11:03:12
From: Doctor Ian
Subject: Re: Seconds since 1980

Hi Bob,

It's more complicated than that; you have to take leap _seconds_ into
account as well. (Every so often, we have to add or subtract a second
to account for changes in the earth's rotational period.)

But basically, the conversion looks like this:

seconds past 1980 =   (days since 1 Jan 1980) * 86400
+ (hours since midnight) * 3600
+ (minutes past the hour) * 60
+ (seconds past the minute)
+ (leap seconds)

To find the number of days, you can do this:

days since 1 Jan 1980 =    (current year - 1980) * 365

+ (current day of year - 1)

+ (1 leap day for
1980, 1984, 1988, 1992, 1996,
2000, 2004, and any other
leap years that have passed)

Here is a table, through 1999, of the leap seconds accumulated by
date:

Leap seconds      Date
------------    ----------
19          1980-JAN-1
20          1981-JUL-1
21          1982-JUL-1
22          1983-JUL-1
23          1985-JUL-1
24          1988-JAN-1
25          1990-JAN-1
26          1991-JAN-1
27          1992-JUL-1
28          1993-JUL-1
29          1994-JUL-1
30          1996-JAN-1
31          1997-JUL-1
32          1999-JAN-1

According to the USNO Web site, no new leap seconds have been added
since 1999, but you can always get an up-to-date listing from the NAIF
Project at NASA/JPL:

http://naif.jpl.nasa.gov/naif.html

In fact, if you plan to be doing this kind of thing with any

You'll also need to convert from your local time to Greenwich Mean
Time before doing the conversion!

I hope this helps.  Write back if you'd like to talk more about
this, or anything else.

- Doctor Ian, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
Elementary Calendars/Dates/Time
Middle School Calendars/Dates/Time

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search