Does Contao interpret form‑submitted dates without timezone as server UTC or user local time?
25K reputation · 07 Sept 2021, 15:40 UTC
Goal: Determine how Contao should treat date values entered in back‑end forms when no explicit time‑zone offset is supplied, so that stored timestamps remain accurate for users in different regions.
Constraint: Contao persists all date/time fields as UTC timestamps and relies on the PHP DateTimeZone conversion based on the configured default time zone (global, language, or user). When a form submits a plain date string, the current implementation assumes the value belongs to the server’s default time zone, which may differ from the user’s zone and can shift the resulting UTC stamp by an hour or more, especially across DST boundaries.
Uncertainty: It is unclear whether administrators can change this fallback behavior per user, per language, or via a form field option, and whether the {{date}} modifier or calendar modules will correctly interpret the stored value after such a shift.
- Which configuration setting controls the time‑zone assumption for bare date inputs in Contao forms?
- Can a per‑user time‑zone override be applied to prevent the server‑zone fallback?
- Does the current behavior comply with multi‑regional deployments that require UTC‑only storage regardless of input zone?