summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Doane <jaydoane@apache.org>2019-12-13 16:34:25 -0800
committerGitHub <noreply@github.com>2019-12-13 16:34:25 -0800
commit18b97f7c44d8143ea6231f2547ae20d480becdb5 (patch)
tree6e83ce185c59043461d49c45dd441437a6e441db
parentee05af890ddbc3b15d3bc85ca0b5502be98a1f63 (diff)
parentc2ff5b720f5fe87d894c144eab09efcba5412002 (diff)
downloadcouchdb-18b97f7c44d8143ea6231f2547ae20d480becdb5.tar.gz
Merge pull request #2361 from cloudant/smoosh-utc-fix
Make smoosh use UTC for scheduling window
-rw-r--r--src/smoosh/src/smoosh_utils.erl2
-rw-r--r--src/smoosh/test/exunit/scheduling_window_test.exs2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/smoosh/src/smoosh_utils.erl b/src/smoosh/src/smoosh_utils.erl
index b433de033..fcd0fcd6f 100644
--- a/src/smoosh/src/smoosh_utils.erl
+++ b/src/smoosh/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);
diff --git a/src/smoosh/test/exunit/scheduling_window_test.exs b/src/smoosh/test/exunit/scheduling_window_test.exs
index 7fa6c23a7..9da4a3150 100644
--- a/src/smoosh/test/exunit/scheduling_window_test.exs
+++ b/src/smoosh/test/exunit/scheduling_window_test.exs
@@ -1,8 +1,6 @@
defmodule SmooshSchedulingWindowTest do
use Couch.Test.ExUnit.Case
- alias Couch.Test.Setup
-
setup_all(context) do
test_ctx = :test_util.start_couch([])