[erlang-questions] How to format a local timestamp?

Roberto Aloi roberto.aloi@REDACTED
Sat Oct 3 01:06:14 CEST 2009


Hi Cameron,

this has been implemented within the Erlang Web Framework, available here:
http://www.erlang-web.org/

Please, have a look to the wtype_datetime module.

Documentation can be found here:
http://wiki.erlang-web.org/Wparts/BasicTypes/datetime

Regards,

Roberto Aloi
roberto.aloi@REDACTED
http://www.erlang-consulting.com
http://aloiroberto.wordpress.com


----- Messaggio originale -----
Da: "Cameron Kerr" <ckerr@REDACTED>
A: "Erlang Questions" <erlang-questions@REDACTED>
Inviato: Venerdì, 2 ottobre 2009 23:05:14 GMT +00:00 GMT Gran Bretagna, Irlanda, Portogallo
Oggetto: [erlang-questions] How to format a local timestamp?

I must surely be missing something in the documentation, but I cannot 
find any easy way to generate a human-readable timestamp easily in Erlang.

I would have expected something in the calendar module, but there is 
nothing that returns a string. I've hunted and I found something for 
RFC1123 format in httpd_util, but that is always in GMT, and I would 
much prefer something more familiar to the user (ie. localtime, with or 
without timezone).

Surely there must be a standard function for doing something like 
this... until then, I'll just ~p  calendar:local_time().

Thanks,
Cameron

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org



More information about the erlang-questions mailing list