Skip to content

Commit

Permalink
fix: change datetime.now to utcnow (googleapis#251)
Browse files Browse the repository at this point in the history
Fixes googleapis#228  🦕

I think it's related to googleapis#244 issue so changed datetime.now() to datetime.utcnow()
  • Loading branch information
HemangChothani authored and cojenco committed Oct 13, 2021
1 parent be72a5e commit 2955fc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 2955fc6

Please sign in to comment.