[erlang-questions] NTP timestamp

Torben Hoffmann torben.lehoff@REDACTED
Fri Dec 28 23:19:02 CET 2007


On Dec 28, 2007 12:39 AM, József Bérces <jozsef.berces@REDACTED> wrote:

>  Hi,
>
> I would like to convert NTP timestamps (seconds elapsed since 00:00:00
> January 1st, 1900) to Erlang date/time tuples (UTC). I did not find any such
> functions in the OTP libraries. It seems that there is no function for
> converting now() to UTC date and time, either.
>
> Any help would be welcome.
>
> Thanks,
> Jozsef
>
Try looking at http://www.trapexit.org/Todays_Date and you can use
now_to_universal_time/1 as well - you have to read the manual for calendar (
http://www.erlang.org/doc/man/calendar.html) for the details.

Cheers,
Torben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071228/d4ca1de1/attachment.htm>


More information about the erlang-questions mailing list