erlang:now/0 off by over 90 seconds

Garrett Smith g@REDACTED
Mon Jul 12 06:43:54 CEST 2010


I'm getting this:

1> {calendar:now_to_local_time(erlang:now()), erlang:localtime()}.
{{{2010,7,11},{23,36,54}},{{2010,7,11},{23,35,20}}}

erlang:now() is giving a result that's ~90 seconds in the future
(according to the OS clock - e.g. `date`)

I'm running VMWare and `hwclock` gives a "Cannot access the Hardware
Clock via any known method."

The docs state that "some other method" may be used to calculate the
now value if the OS doesn't support epoch time reporting.

Any thoughts on this?

Garrett


More information about the erlang-questions mailing list