diff --git a/scripts/assemble_changelog.py b/scripts/assemble_changelog.py index 07e6fc58a..99c97a902 100755 --- a/scripts/assemble_changelog.py +++ b/scripts/assemble_changelog.py @@ -350,13 +350,13 @@ def commit_timestamp(commit_id): 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): """Return the modification timestamp of the given file.""" mtime = os.stat(filename).st_mtime - return datetime.datetime.fromtimestamp(mtime) + return datetime.datetime.fromtimestamp(mtime, datetime.timezone.utc) def __init__(self, filename): """Determine position of the file in the changelog entry order.