[erlang-bugs] erlang:now() and erlang:localtime() return different results

Simon Smithies simon@REDACTED
Fri Apr 5 11:41:44 CEST 2013


Hi,

Erlang newbie here ...

I have two Debian linux VPSs, both largely identical except for Erlang
versions, running in Virtuozzo containers with the same provider.

On the VPS running Erlang R14B04, erlang:now() and erlang:localtime()
return identical results (as they do on my local machine, and some others
we've tried):
1> {calendar:now_to_local_time(erlang:now()), erlang:localtime()}.
{{{2013,4,5},{22,12,57}},{{2013,4,5},{22,12,57}}}

On the other VPS however, running Erlang R15B01, I get different results:
1> {calendar:now_to_local_time(erlang:now()), erlang:localtime()}.
{{{2013,4,5},{22,35,29}},{{2013,4,5},{22,30,29}}}

As background, I'm running Zotonic on both VPSs; on the R15B01 machine
Zotonic is being regularly restarted by the heart process -- every 5
minutes. Have been talking to the Zotonic people about this, and in the
absence of a better explanation, we're thinking this time difference might
be the cause.

Anyway, logging here as the difference seems like a bug in Erlang.

- Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20130405/ad08dccf/attachment.htm>


More information about the erlang-bugs mailing list