Commit 3c154ec
committed
Fix future-post warning to properly account for timezones
Previously the check only extracted YYYY-MM-DD from the front matter
date, silently discarding any time and timezone offset. This caused
false positives for NZ-timezone posts (e.g. "2026-03-05 00:00:00 +1300"
is 2026-03-04 in UTC, but the check treated it as March 5) and false
negatives for posts with negative UTC offsets.
Now the full front matter date value is passed to GNU date with -u -d
to get the correct UTC date, matching Jekyll's own behaviour.
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>1 parent 0317f69 commit 3c154ec
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
0 commit comments