You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2012/08/16 15:45:32 UTC

git commit: Fix local to universal handling

Updated Branches:
  refs/heads/master 010522ea3 -> 317c97f4e


Fix local to universal handling


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/317c97f4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/317c97f4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/317c97f4

Branch: refs/heads/master
Commit: 317c97f4eb434ec962b004dc2444fc0e8bb01d5b
Parents: 010522e
Author: Robert Newson <rn...@apache.org>
Authored: Thu Aug 16 14:45:26 2012 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Aug 16 14:45:26 2012 +0100

----------------------------------------------------------------------
 src/mochiweb/mochiweb_cookies.erl |    2 +-
 src/mochiweb/mochiweb_request.erl |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/317c97f4/src/mochiweb/mochiweb_cookies.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb/mochiweb_cookies.erl b/src/mochiweb/mochiweb_cookies.erl
index 1901d5e..ee91d0c 100644
--- a/src/mochiweb/mochiweb_cookies.erl
+++ b/src/mochiweb/mochiweb_cookies.erl
@@ -51,7 +51,7 @@ cookie(Key, Value, Options) ->
                            undefined ->
                                calendar:universal_time();
                            LocalTime ->
-                               calendar:local_time_to_universal_time_dst(LocalTime)
+                               erlang:localtime_to_universaltime(LocalTime)
                        end,
                 Age = case RawAge < 0 of
                           true ->

http://git-wip-us.apache.org/repos/asf/couchdb/blob/317c97f4/src/mochiweb/mochiweb_request.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb/mochiweb_request.erl b/src/mochiweb/mochiweb_request.erl
index a114203..980f5ad 100644
--- a/src/mochiweb/mochiweb_request.erl
+++ b/src/mochiweb/mochiweb_request.erl
@@ -641,7 +641,7 @@ read_file_info(File) ->
     end.
 
 to_universal(LocalTime) ->
-    calendar:local_time_to_universal_time_dst(LocalTime).
+    erlang:localtime_to_universaltime(LocalTime).
 
 server_headers() ->
     [{"Server", "MochiWeb/1.0 (" ++ ?QUIP ++ ")"},


Re: git commit: Fix local to universal handling

Posted by Robert Newson <rn...@apache.org>.
It's not really a fix, it's a workaround for timezone calculation bugs in OTP. It could go upstream to mochiweb, I guess. Note that Bob D fixed a typo in the static file shipping that I missed.

B.


On 28 Aug 2012, at 09:12, Benoit Chesneau wrote:

> On Thu, Aug 16, 2012 at 3:45 PM,  <rn...@apache.org> wrote:
>> Updated Branches:
>>  refs/heads/master 010522ea3 -> 317c97f4e
>> 
>> 
>> Fix local to universal handling
>> 
> 
> I don't see the changes proposed upstream to mochiweb. Are these
> patches already included or do we just forget about it?
> 
> - benoît


Re: git commit: Fix local to universal handling

Posted by Benoit Chesneau <bc...@gmail.com>.
On Thu, Aug 16, 2012 at 3:45 PM,  <rn...@apache.org> wrote:
> Updated Branches:
>   refs/heads/master 010522ea3 -> 317c97f4e
>
>
> Fix local to universal handling
>

I don't see the changes proposed upstream to mochiweb. Are these
patches already included or do we just forget about it?

- benoît