UTC Default vs Custom TZ Environment Variable for Regional Time Handling on Glitch
0 reputation · 11 Dec 2022, 05:33 UTC
Goal
Determine whether to rely on Glitch’s default UTC system clock or to set a custom TZ environment variable for consistent regional date handling across project restarts.
Constraints and Uncertainty
Glitch containers run on UTC by default, and application‑level time zone conversion must be performed in code (e.g., Intl.DateTimeFormat). Setting TZ via .env can affect the Node.js process, but its persistence after certain restarts or container migrations is not guaranteed, creating a trade‑off between platform‑wide consistency and localized server‑side timestamps.
Specific questions:
- Should developers keep the platform’s UTC default and handle localization exclusively in application code, or is setting a custom TZ environment variable preferable for server‑side time consistency?
- What impact does each approach have on log timestamps, scheduled jobs, and user‑facing date display?
- How can one verify that the chosen time zone setting remains stable after a project restart or container migration?