[erlang-bugs] Wrong gregorian date

Alex Kutsko <>
Mon Mar 1 16:29:11 CET 2010


But the date you provided is not gregorian seconds.
try
calendar:datetime_to_gregorian_seconds({date(),time()}).
63434683473
.
The result you actually got is February 29, 2040 - you can ensure that this
year is leap year :).


On Mon, Mar 1, 2010 at 4:05 PM, Sergei Fomin <> wrote:

> 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:
>
>


-- 
Best regards,
Alex Kutsko


More information about the erlang-bugs mailing list