From f3e151299b6cde3ce53e17f86348f7c051c18f16 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 27 Oct 2025 09:44:57 +0100 Subject: [PATCH] Silence warning about timezone in datetime object Modern versions of Python emit a DeprecationWarning about `datetime.datetime.utcfromtimestamp()`. It didn't really matter here, but do stop using it. Signed-off-by: Gilles Peskine --- scripts/assemble_changelog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/assemble_changelog.py b/scripts/assemble_changelog.py index 69ee1b138..ef8c1e1fe 100755 --- a/scripts/assemble_changelog.py +++ b/scripts/assemble_changelog.py @@ -341,7 +341,8 @@ class EntryFileSortKey: text = subprocess.check_output(['git', 'show', '-s', '--format=%ct', commit_id]) - return datetime.datetime.utcfromtimestamp(int(text)) + return datetime.datetime.fromtimestamp(int(text), + datetime.timezone.utc) @staticmethod def file_timestamp(filename):