generate-newsletter.py: --since with a bare date drops commits made earlier that day
Author: Rome-1Created Sep 30, 2026Updated Sep 30, 2026
Labelsstatus/needs-triage
What happens
scripts/generate-newsletter.py drops commits made on the start date before the current time of day.
get_commits_since() passes git a bare date:
["git", "log", f"--since={since_date.strftime('%Y-%m-%d')}", ...](scripts/generate-newsletter.py:159 on main.)
Git parses a bare date as that day at the current wall-clock time, not at midnight.
So --since 2026-01-10 run at 17:00 excludes every commit from 00:00 to 17:00 that day, and the result depends on when the script runs.
Expected
--since YYYY-MM-DD includes all commits from the start of that day.
Reproduce
git init t && cd t
GIT_AUTHOR_DATE=2026-01-10T09:00:00 GIT_COMMITTER_DATE=2026-01-10T09:00:00 \
git commit -q --allow-empty -m a
now=$(date -d '2026-01-10 17:00' +%s)
GIT_TEST_DATE_NOW=$now git log --since=2026-01-10 --oneline | wc -l # 0
GIT_TEST_DATE_NOW=$now git log --since=2026-01-10T00:00:00 --oneline | wc -l # 1Suggested fix
Pass a full timestamp: f"--since={since_date.strftime('%Y-%m-%dT%H:%M:%S')}".
Source: gastownhall/gastown