From 69bd6396db6864cdd56d6e42673958a17f8f4e67 Mon Sep 17 00:00:00 2001 From: jesko Date: Tue, 19 Nov 2024 23:24:18 +0100 Subject: [PATCH] remove time zone information --- refinery/lib/tools.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/refinery/lib/tools.py b/refinery/lib/tools.py index 222e109c61..bdcde71721 100644 --- a/refinery/lib/tools.py +++ b/refinery/lib/tools.py @@ -423,9 +423,10 @@ def date_from_timestamp(ts: int): Convert a UTC timestamp to a datetime object. """ if sys.version_info >= (3, 12): - return datetime.datetime.fromtimestamp(ts, datetime.UTC) + dt = datetime.datetime.fromtimestamp(ts, datetime.UTC) else: - return datetime.datetime.utcfromtimestamp(ts) + dt = datetime.datetime.utcfromtimestamp(ts) + return dt.replace(tzinfo=None) def integers_of_slice(s: slice) -> Iterable[int]: