[erlang-bugs] buggy comment in calendar.erl

Ulf Wiger <>
Tue Aug 16 18:56:24 CEST 2011


My eye just happened to catch on this:

%% now_to_universal_time(Now)
%% now_to_datetime(Now)
%%
%% Convert from now() to UTC.
%%
%% Args: Now = now(); now() = {MegaSec, Sec, MilliSec}, MegaSec = Sec
%% = MilliSec = integer() 


The format of now() is {MegaSec, Sec, MicroSec}, not {MegaSec, Sec, MilliSec}.

It's just a commenting bug, since the function freely ignores the third element.

BR,
Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com





More information about the erlang-bugs mailing list