[erlang-bugs] Error in httpd_util:rfc1123_date

Kenji Rikitake kenji.rikitake@REDACTED
Wed Jan 20 02:30:31 CET 2010


Paul Guyot has fixed this, though this hasn't been in the R13B03 yet.
http://www.erlang.org/pipermail/erlang-bugs/2008-November/001077.html
patch:
http://www.erlang.org/pipermail/erlang-bugs/attachments/20081101/c1bab4d9/attachment.obj

Kenji Rikitake

In the message <e2111bbb1001181327u37af23aai94fb28fac3d05e34@REDACTED>
dated Mon, Jan 18, 2010 at 04:27:01PM -0500,
Paul Davis <paul.joseph.davis@REDACTED> writes:
> It would appear that depending on timezone the following call to
> rfc1123_date breaks with a badarg:
> 
> 1> httpd_util:rfc1123_date(erlang:localtime()).
> ** exception error: bad argument
>      in function erlang:universaltime_to_localtime/1
>         called as erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}})
>      in call from calendar:local_time_to_universal_time_dst/1
>      in call from httpd_util:rfc1123_date/1
> 2>
> 
> Seeing as that's 1 second before 12:00 AM Jan 1st, 1970 I'm guessing
> its a miscalculation somewhere.
> 
> This has been demonstrated in the time zones:
> 
> Western Indonesian Time
> And Arabian Standard Time
> East Africa Time
> 
> A bit of digging turned up [1] which seems like it might be related.
> 
> 
> Paul Davis
> 
> 
> [1] http://www.erlang.org/cgi-bin/ezmlm-cgi/3/334
> 
> ________________________________________________________________
> erlang-bugs mailing list. See http://www.erlang.org/faq.html
> erlang-bugs (at) erlang.org


More information about the erlang-bugs mailing list