Eleventy Front Matter Date Parsing ↔︎ Nunjucks Date Filter: Time Zone Consistency
0 reputation · 01 Oct 2026, 04:15 UTC
When a Markdown file contains a date in front matter without an explicit UTC offset, Eleventy parses it as a local JavaScript Date using the host’s time zone unless a global timezone setting is supplied. The resulting Date object is stored in the collection and used for sorting, but the date filter in Nunjucks/Liquid formats it according to the runtime’s zone, which may differ from the zone used during parsing. This discrepancy can cause identical wall‑clock times to appear shifted in the final HTML, especially in CI environments that run in UTC.
Because Eleventy does not expose an API to query or adjust the zone of a parsed Date after front‑matter processing, authors must rely on either a global timezone configuration or external plugins to enforce a single zone across the build.
Given this behavior, what is Eleventy's internal representation for dates parsed from front matter without offsets, how does the date filter determine the zone when rendering, and is there a built‑in way to override the zone per template or collection to guarantee consistent wall‑clock output?