[erlang-bugs] Wrong Gregorian date

Sergei Fomin dafgar@REDACTED
Mon Mar 1 15:37:43 CET 2010


Oh, my fault.
Thank you.

Best regards,
Sergei Fomin




Trevor Woollacott [ MTN - Innovation Centre ] wrote:
> 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.
> 
> Regards,
> Trevor
> 
> 
> -----Original Message-----
> From: erlang-bugs@REDACTED [mailto:erlang-bugs@REDACTED] On Behalf Of Sergei Fomin
> Sent: Monday, 01 March 2010 04:05 PM
> To: erlang-bugs@REDACTED
> Subject: [erlang-bugs] Wrong gregorian date
> 
> Hello.
> 
> It seems a part of calendar library thinks there is February 29, 2010.
> 
> # date +%s
> 1267451701
> 
> Eshell V5.7.4  (abort with ^G)
> 1> calendar:gregorian_seconds_to_datetime(1267451701).
> {{40,2,29},{13,55,1}}
> 
> 
> Best regards,
> Sergei Fomin
> 
> 
> 
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED
> 
> 
> 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