From fee3a41dc0a6c33f491cf947311a228bf5ef946c Mon Sep 17 00:00:00 2001
From: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date: Thu, 11 Apr 2019 12:03:10 +0200
Subject: [PATCH] Make sure timestamps can be represented by Python no matter
 the timezone

---
 swh/model/hypothesis_strategies.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/swh/model/hypothesis_strategies.py b/swh/model/hypothesis_strategies.py
index 59f82146..3e006c8a 100644
--- a/swh/model/hypothesis_strategies.py
+++ b/swh/model/hypothesis_strategies.py
@@ -41,8 +41,10 @@ def persons():
 
 
 def timestamps():
-    max_seconds = datetime.datetime.max.timestamp()
-    min_seconds = datetime.datetime.min.timestamp()
+    max_seconds = datetime.datetime.max.replace(
+        tzinfo=datetime.timezone.utc).timestamp()
+    min_seconds = datetime.datetime.min.replace(
+        tzinfo=datetime.timezone.utc).timestamp()
     return builds(
         Timestamp,
         seconds=integers(min_seconds, max_seconds),
-- 
GitLab