[ 
https://issues.apache.org/jira/browse/COUCHDB-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801951#action_12801951
 ] 

Robert Newson commented on COUCHDB-627:
---------------------------------------

This might even be an Erlang bug;

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> 

httpd_util:rfc1123_date declares it takes local time, but it blows up if you 
try it in the WIT timezone.


Ooooops.

> badarg caused in UTC+7 timezones
> --------------------------------
>
>                 Key: COUCHDB-627
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-627
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 0.11
>         Environment: MacBook Pro, Snow Leopard 10.6.2
>            Reporter: Robert Newson
>
> A user reported problems on IRC. It turns out that couchdb (or mochiweb) 
> barfs when the local machine is set to some timezones.
> I set my local timezone to Western Indonesian Time (WIT) and reproduced the 
> bug. 
> Steps
> 1) Change to WIT
> 2) Visit Futon
> Error;
> {"error":"unknown_error","reason":"badarg"}
> and logs report;
> [info] [<0.104.0>] 127.0.0.1 - - 'GET' /_utils/index.html 500
> [error] [<0.112.0>] Badarg error in HTTP request
> [info] [<0.112.0>] Stacktrace: 
> [{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]},
>              {calendar,local_time_to_universal_time_dst,1},
>              {httpd_util,rfc1123_date,1},
>              {mochiweb_request,maybe_serve_file,3},
>              {couch_httpd,serve_file,4},
>              {couch_httpd,handle_request,5},
>              {mochiweb_http,headers,5},
>              {proc_lib,init_p_do_apply,3}]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to