You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/03/19 23:27:17 UTC

[jira] [Commented] (COUCHDB-627) badarg caused in UTC+7 timezones

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

ASF subversion and git services commented on COUCHDB-627:
---------------------------------------------------------

Commit 09b034911aed037839978d7e3f4905a4004fb74e in branch refs/heads/1696-update-mochiweb-2-4-2 from [~rnewson]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb.git;h=09b0349 ]

COUCHDB-627 - Support all timezones

Forward-ported over top of MochiWeb 2.4.2, comprising specific chunks
of b1a049bb, 445e919, 010522e, 317c97f lost during MochiWeb upgrade.

Some timezones are incorrectly handled by OTP's calendar module. The
ironic thing is that we only ever need the time in GMT (for HTTP
response headers and the log file).

This patch duplicates httpd_util:rfc1123_date/0 and /1 but uses
universal time everywhere, avoiding the broken conversion code.

- Support all timezones for R14 series.
- the _dst variant does exist in R14B04.
- Fix local to universal handling.

Also relates to COUCHDB-1513, a duplicate of COUCHDB-627.

                
> 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
>            Assignee: Robert Newson
>             Fix For: 1.3
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira