You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2019/12/12 23:57:34 UTC

[couchdb-smoosh] 01/02: Switch to UTC

This is an automated email from the ASF dual-hosted git repository.

jaydoane pushed a commit to branch utc-time
in repository https://gitbox.apache.org/repos/asf/couchdb-smoosh.git

commit e335d8c7ee38eba08a5cd2f09b8de4f4a9ecda7c
Author: Jay Doane <ja...@apache.org>
AuthorDate: Thu Dec 12 14:31:03 2019 -0800

    Switch to UTC
    
    The tests assume UTC, and tend to fail in some timezones more than
    others.
---
 src/smoosh_utils.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/smoosh_utils.erl b/src/smoosh_utils.erl
index b433de0..fcd0fcd 100644
--- a/src/smoosh_utils.erl
+++ b/src/smoosh_utils.erl
@@ -66,7 +66,7 @@ in_allowed_window(Channel) ->
     in_allowed_window(From, To).
 
 in_allowed_window(From, To) ->
-    {HH, MM, _} = erlang:time(),
+    {_, {HH, MM, _}} = calendar:universal_time(),
     case From < To of
     true ->
         ({HH, MM} >= From) andalso ({HH, MM} < To);