15

I need to report a time in seconds since 1st January 1900. I have the number of seconds since the start of the Unix epoch.

Can anybody point me to a definitive reference to the number of seconds between 1/1/1900 and 1/1/1970?

2
  • Which calendar? Note that Jan 1st 1900 falls on very different dates in Julian and Gregorian calendars. This is relevant as both were widely used at that time. Also, what timezone? The Epoch starts at 1970-01-01 00:00:00 UTC. Other than that, (number of days in non-leap yearsnumber of seconds in a daynumber of non-leap years) + (number of days in leap yearsnumber of seconds in a daynumber of leap years) Jan 10, 2012 at 15:34
  • Good question... let's say Gregorian.
    – grifaton
    Jan 10, 2012 at 15:37

2 Answers 2

36

According to the Time protocol in RFC 868 it is 2208988800L.

The Time

The time is the number of seconds since 00:00 (midnight) 1 January 1900 GMT, such that the time 1 is 12:00:01 am on 1 January 1900 GMT; this base will serve until the year 2036.

For example:

the time 2,208,988,800 corresponds to 00:00 1 Jan 1970 GMT,

         2,398,291,200 corresponds to 00:00  1 Jan 1976 GMT,

         2,524,521,600 corresponds to 00:00  1 Jan 1980 GMT,

         2,629,584,000 corresponds to 00:00  1 May 1983 GMT,

    and -1,297,728,000 corresponds to 00:00 17 Nov 1858 GMT.
3
  • When I add 2208988800 value to seconds since epoch value of *nix, I get seconds since 01.01.1970 correctly. Thanks
    – user3905644
    Aug 11, 2016 at 6:55
  • Year 2036? 2038! May 30, 2021 at 7:07
  • Yes Mohammad, RFC 868 and RFC 5905 wrap in 2036. Unix dates wrap around in 2038. The question was number of seconds from 1900 to Unix Epoch.
    – Gary
    Jun 4, 2021 at 12:05
9

70 years = 2,208,988,800 seconds, 01-01-1900 00:00 to 01:01-1970 00:00

3
  • Does that include leap years? Jan 10, 2012 at 15:38
  • 1
    Leap years, yes, but not time zones, daylight savings or leap seconds.
    – Matt H
    Jan 10, 2012 at 15:40
  • 6
    AFAIK, leap seconds have only been announced since 1972, so we needn't worry about those. Jan 10, 2012 at 15:41

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.