TeX \time primitive: missing time zone configuration for reproducible timestamps
0 reputation · 25 Feb 2022, 10:45 UTC
TeX's \time, \day, \month, and \year primitives report the host operating system's local clock at engine start without any time zone awareness. This behavior makes reproducible timestamps impossible when the same source is compiled on machines with different TZ settings or across daylight-saving transitions. PDF metadata fields such as \pdfcreationdate inherit the same local-time values, so cross-platform builds produce inconsistent creation dates. The engine provides no primitive to query, set, or offset the time zone, nor to convert the reported values to UTC. External wrappers or LuaTeX callbacks can adjust the environment before invocation, but the core primitives remain bound to the process-local clock.
What configuration mechanism would allow a document to declare its intended time zone so that \time and derived primitives yield consistent, zone-independent values? Can \pdfcreationdate be made to emit a fixed UTC timestamp without relying on external environment manipulation?