1515
1616from __future__ import annotations
1717
18- from datetime import datetime , timezone
18+ from datetime import UTC , datetime
1919from pathlib import Path
2020from typing import Any
2121
@@ -35,7 +35,7 @@ def _commit_to_dict(commit: git.Commit, *, include_files_changed_count: bool = F
3535 include_files_changed_count: If True, compute the number of files
3636 changed (triggers a diff — slow for bulk iteration).
3737 """
38- dt = datetime .fromtimestamp (commit .committed_date , tz = timezone . utc )
38+ dt = datetime .fromtimestamp (commit .committed_date , tz = UTC )
3939 result : dict [str , Any ] = {
4040 "hash" : commit .hexsha [:7 ],
4141 "full_hash" : commit .hexsha ,
@@ -144,7 +144,7 @@ def get_commit_detail(
144144 raise errors .GitError (f"Could not resolve commit '{ commit_hash } ': { exc } " )
145145
146146 try :
147- dt = datetime .fromtimestamp (commit .committed_date , tz = timezone . utc )
147+ dt = datetime .fromtimestamp (commit .committed_date , tz = UTC )
148148
149149 parent_hashes = [p .hexsha [:7 ] for p in commit .parents ]
150150
@@ -275,7 +275,7 @@ def get_blame(
275275 "full_hash" : commit .hexsha ,
276276 "author" : str (commit .author ),
277277 "date" : datetime .fromtimestamp (
278- commit .committed_date , tz = timezone . utc
278+ commit .committed_date , tz = UTC
279279 ).isoformat (),
280280 "line_content" : line_text ,
281281 "commit_message" : commit .message .strip ().split ("\n " )[0 ],
0 commit comments