From f1f4c9e00b3a411f9ca24e4a380f06a624737989 Mon Sep 17 00:00:00 2001 From: Jon Holba Date: Wed, 27 Sep 2023 15:49:07 +0200 Subject: [PATCH] Use datetime.utcfromtimestamp instead of first using gmtime CTime.datetime --- python/ecl/util/util/ctime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ecl/util/util/ctime.py b/python/ecl/util/util/ctime.py index 1500c3247..0b7beaf9b 100644 --- a/python/ecl/util/util/ctime.py +++ b/python/ecl/util/util/ctime.py @@ -50,7 +50,7 @@ def date(self): return datetime.date(*self.time()[0:3]) def datetime(self): - return datetime.datetime(*self.time()[0:6]) + return datetime.datetime.utcfromtimestamp(self.ctime()) def __str__(self): return self.datetime().strftime("%Y-%m-%d %H:%M:%S%z")