lastmod: git dates commits in the site's timezone #40

Merged
jcoffey-dev merged 1 commits from fix/lastmod-timezone into main 2026-10-19 16:42:42 +00:00
Owner

Fix for 0.10.0's lastmod: git: commit dates are now taken in the site's timezone:, the same way "today" is for changes not committed yet.

The bug: a page changed and built at 22:00 in Arizona, in a site on UTC, was dated the next day (today, in UTC). After the commit it was dated the day before (the commit's own -07:00 date). Rebuilding the same commit gave a different sitemap, and linuxexpert.net's deploy check, which rebuilds and compares, would refuse it.

Checked: TestGitLastmod now expects a 23:30 -07:00 commit on the next day in a UTC site, and on the same day in an America/Phoenix site. gofmt, go vet and go test ./... pass.

**Fix for 0.10.0's `lastmod: git`:** commit dates are now taken in the site's `timezone:`, the same way "today" is for changes not committed yet. **The bug:** a page changed and built at 22:00 in Arizona, in a site on UTC, was dated the next day (today, in UTC). After the commit it was dated the day before (the commit's own -07:00 date). Rebuilding the same commit gave a different sitemap, and linuxexpert.net's deploy check, which rebuilds and compares, would refuse it. **Checked:** TestGitLastmod now expects a 23:30 -07:00 commit on the next day in a UTC site, and on the same day in an America/Phoenix site. `gofmt`, `go vet` and `go test ./...` pass.
jcoffey-dev added 1 commit 2026-10-19 16:40:48 +00:00
lastmod: git dates commits in the site's timezone
ci / editor-ui (pull_request) Successful in 23s
ci / go (pull_request) Successful in 1m19s
eaef5b8a73
Today was taken in the site's timezone but a commit's date in its
committer's, so a page built in the evening before its commit could
get a different date from the same page built after it.
jcoffey-dev merged commit ca93bfbf8a into main 2026-10-19 16:42:42 +00:00
jcoffey-dev deleted branch fix/lastmod-timezone 2026-10-19 16:42:42 +00:00
Sign in to join this conversation.