From c3461ab5c6c2ced43755c428ed9ddf9ffc7fbddf Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 21 Aug 2023 10:17:40 -0400 Subject: [PATCH] update datetime usage for python 3.12 --- asdf/asdf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asdf/asdf.py b/asdf/asdf.py index 0ea3b45ef..ac6da11e1 100644 --- a/asdf/asdf.py +++ b/asdf/asdf.py @@ -1336,8 +1336,9 @@ def add_history_entry(self, description, software=None): elif software is not None: software = Software(software) - time_ = datetime.datetime.utcfromtimestamp( + time_ = datetime.datetime.fromtimestamp( int(os.environ.get("SOURCE_DATE_EPOCH", time.time())), + datetime.timezone.utc ) entry = HistoryEntry(