Skip to content

Commit 0b22a52

Browse files
authored
Merge pull request #3795 from mkdocs/tomchristie-patch-1
Resolve `SOURCE_DATE_EPOCH=0` bug.
2 parents 695d8ed + 05a64b4 commit 0b22a52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mkdocs/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ 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()
5959
return int(dt.timestamp())

0 commit comments

Comments
 (0)