DST transition causes inconsistent offsets between \time and \pdfcreationdate in pdfTeX
0 reputation · 19 Nov 2021, 11:46 UTC
When a pdfTeX job starts before a daylight-saving transition and writes the PDF catalog after the switch, the \time primitive (captured at process start) and \pdfcreationdate (evaluated at \pdfcatalog write time) can reflect different UTC offsets. This breaks reproducible builds that rely on a single authoritative timestamp. The engine provides no internal switch to synchronize these values or to force UTC interpretation of \time. Wrappers must set TZ=UTC externally before invocation, but this does not help when the job spans the transition boundary. The LaTeX package datetime2 explicitly states "time zone support is not available" and offers no pure-TeX workaround.
- Is there a pdfTeX callback or primitive to force
\pdfcreationdateto use the same offset as\time? - Can LuaTeX's
os.date("*t", os.time())with a fixed epoch be safely injected into the PDF catalog without triggering a rebuild of the entire format? - What is the minimal wrapper strategy that guarantees identical offsets for both registers across a DST boundary?