[erlang-questions] erlang:now/0 off by over 90 seconds
Garrett Smith
g@REDACTED
Mon Jul 12 17:06:58 CEST 2010
Yah, this was indeed the issue. I wasn't running hwclock as root. The
potential drift between system time and "hardware" clock on VMWare is
pretty awful.
It is somewhat surprising though that calendar and erlang:now/0 use
different sources for their time.
Garrett
On Mon, Jul 12, 2010 at 8:59 AM, Salomon Elizondo <selizondo@REDACTED> wrote:
> double check that your system time is up2date.
> sudo /usr/sbin/ntpdate -u time-a.nist.gov
> sudo /sbin/hwclock --systohc
>
> bug in vmware search "vmware clock drift"
>
>
> On Sun, Jul 11, 2010 at 11:43 PM, Garrett Smith <g@REDACTED> wrote:
>> 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
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>
>>
>
More information about the erlang-questions
mailing list