Skip to content

Commit 05a64b4

Browse files
Use utc timezones consistently
1 parent 7ae7068 commit 05a64b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mkdocs/utils/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def get_build_timestamp(*, pages: Collection[Page] | None = None) -> int:
5353
if pages:
5454
# Lexicographic comparison is OK for ISO date.
5555
date_string = max(p.update_date for p in pages)
56-
dt = datetime.fromisoformat(date_string)
56+
dt = datetime.fromisoformat(date_string).replace(tzinfo=timezone.utc)
5757
else:
5858
dt = get_build_datetime()
59-
return max(int(dt.timestamp()), 0)
59+
return int(dt.timestamp())
6060

6161

6262
def get_build_datetime() -> datetime:

0 commit comments

Comments
 (0)