From 3465d08e098edb250dee5e97d1fb9ded8bae5700 Mon Sep 17 00:00:00 2001 From: HemangChothani <50404902+HemangChothani@users.noreply.github.com> Date: Tue, 25 Aug 2020 23:24:02 +0530 Subject: [PATCH] fix: change datetime.now to utcnow (#251) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #228 🦕 I think it's related to https://github.com/googleapis/python-storage/issues/244 issue so changed datetime.now() to datetime.utcnow() --- tests/system/test_system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/test_system.py b/tests/system/test_system.py index e5ddc648a..e92ae3254 100644 --- a/tests/system/test_system.py +++ b/tests/system/test_system.py @@ -2368,7 +2368,7 @@ def test_get_signed_policy_v4(self): {"bucket": bucket_name}, ["starts-with", "$Content-Type", "text/pla"], ], - expiration=datetime.datetime.now() + datetime.timedelta(hours=1), + expiration=datetime.datetime.utcnow() + datetime.timedelta(hours=1), fields={"content-type": "text/plain"}, ) with open(blob_name, "r") as f: @@ -2395,7 +2395,7 @@ def test_get_signed_policy_v4_invalid_field(self): {"bucket": bucket_name}, ["starts-with", "$Content-Type", "text/pla"], ], - expiration=datetime.datetime.now() + datetime.timedelta(hours=1), + expiration=datetime.datetime.utcnow() + datetime.timedelta(hours=1), fields={"x-goog-random": "invalid_field", "content-type": "text/plain"}, ) with open(blob_name, "r") as f: