From 58c1e6e82720960ac61d0fa6a0dc8ff13c011a46 Mon Sep 17 00:00:00 2001
From: "[ACC] Elena Operation" <elenaop@cwo-193-ad5.cern.ch>
Date: Wed, 23 Feb 2022 14:58:19 +0100
Subject: [PATCH] again a small bug with times...

---
 datascout/tests/test_timeconversion.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/datascout/tests/test_timeconversion.py b/datascout/tests/test_timeconversion.py
index 8f71426..a772494 100644
--- a/datascout/tests/test_timeconversion.py
+++ b/datascout/tests/test_timeconversion.py
@@ -7,15 +7,15 @@ import datetime
 
 def test_time():
     reference_stamp = 1645617457640238425
-    reference_time  = datetime.datetime(2022, 2, 23, 12, 57, 37, 640238)
+    reference_time  = datetime.datetime(2022, 2, 23, 11, 57, 37, 640238, tzinfo=datetime.timezone.utc)
 
     myDateTime_utc     = ds.unixtime_to_datetime(reference_stamp, time_zone = 'utc')
     myDateTime_local   = ds.unixtime_to_datetime(reference_stamp, time_zone = 'local')
     myDateTime_cern    = ds.unixtime_to_datetime(reference_stamp, time_zone = 'CERN')
     myDateTime_unaware = ds.unixtime_to_datetime(reference_stamp, time_zone = None)
 
-    # the unaware time should be as the ref time created above
-    assert (myDateTime_unaware == reference_time)
+    # those should be the same
+    assert (myDateTime_utc == reference_time)
 
     # Note that datetime object are precise only down to the microsecond!
     reference_stamp_us_precision = round(reference_stamp/1000.)*1000
-- 
GitLab