This problem has been fixed now. The issue is related to incorrect, I
think, output of calendar:local_time_to_universal_time_dst/1 which is
used with %I & %S specifiers in order to get universal time. For
difference, see below. It's strange to me that in R11, we get the same
time twice. I'll check with erlang mailing list to see what is the
reason for this. I made a change to log_formatter to handle this case
and will update source code in the web within next 2 days.
For the time being, please use %j and %T instead until this change is commited.
Thanks Xue Yong Zhi for the feedback.
Good luck
Ahmed
[Erlang R12]:
# erl
Eshell V5.6.4 (abort with ^G)
1> calendar:local_time_to_universal_time_dst({{2009,5,13},{17,57,50}}).
[{{2009,5,13},{13,57,50}}]
[Erlang R11]:
# erl
Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0]
[kernel-poll:false]
Eshell V5.5.5 (abort with ^G)
1> calendar:local_time_to_universal_time_dst({{2009,5,13},{17,57,50}}).
[{{2009,5,13},{17,57,50}},{{2009,5,13},{17,57,50}}]
On Wed, May 13, 2009 at 4:59 PM, Ahmed Ali <ahmed....@gmail.com> wrote:
> Hi,
>
> Let's meet in gmail chat to discuss this further. I'd like to do this
> in real time. I want to see exactly how timezone changes affect my
> code. I will be on gmail chat during the next 2 hours. If not today,
> then I'll be available tomorrow from around 10:00 GMT to 12:00 GMT.
>
> For the time being, please do the below in erlang shell and send me
> the output. Also, do you have an old log4erl release setting in erlang
> lib directory? To overcome this, you can run erl -pa $LOG4ERL_DIR.
> Also, can you please run "ls -ltr /etc/localtime" to see what is
> /etc/locatime linked to.
>
>> {ok, Tokens} = log_formatter:parse("[%L] %I %l%n").
>> S = log_formatter:format({log, info,"server started~n",[],{{2009,5,13},{1,18,46}},160714}, Tokens).
>> io:format(S).
>
> Best regards,
>
> Ahmed