[erlang-bugs] Wrong Gregorian date

Trevor Woollacott [ MTN - Innovation Centre ] <>
Mon Mar 1 15:30:55 CET 2010

Hi Sergei

Date +%s does not return the date and time in Gregorian seconds, rather the number of seconds since 1970-01-01 00:00:00 UTC. If you try to convert the number of seconds since 1970 back to into the date & time tuple it correctly calculates the year at 40AD, which is a leap year.


-----Original Message-----
From:  [mailto:] On Behalf Of Sergei Fomin
Sent: Monday, 01 March 2010 04:05 PM
Subject: [erlang-bugs] Wrong gregorian date


It seems a part of calendar library thinks there is February 29, 2010.

# date +%s

Eshell V5.7.4  (abort with ^G)
1> calendar:gregorian_seconds_to_datetime(1267451701).

Best regards,
Sergei Fomin

erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:

NOTE: This e-mail message is subject to the MTN Group disclaimer see http://www.mtn.co.za/SUPPORT/LEGAL/Pages/EmailDisclaimer.aspx

More information about the erlang-bugs mailing list