Native Time Zone field type (with ISO/IANA standards support) #18839
Unanswered
alexanderloewe
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Craft CMS would benefit from a dedicated Time Zone field type — a first-class field that lets editors pick a time zone from a pre-populated list of all IANA time zones, similar to how a Country field provides a complete list of ISO 3166 countries.
Motivation
Craft already works with time zones extensively under the hood:
DateTimeZone, which is backed by the IANA tz database (~600 zone identifiers likeEurope/Berlin,America/Los_Angeles,Asia/Tokyo).So the data set already exists in the platform and is actively used. What's missing is the ability to store a time zone as a standalone value on an entry, without it being coupled to a specific date/time.
Use cases
Right now, achieving this requires either:
None of these are ideal given that Craft already ships with the full data set via PHP.
Proposed feature
A new Time Zone field type with:
DateTimeZone::listIdentifiers()(full IANA tz database).UTCandEtc/*).Europe/*).DateTimeZoneobject in Twig/PHP, with the raw IANA identifier accessible as a string.Relevant standards
For the format/display options, the following standards are relevant:
Europe/Berlin. Maintained by IANA under [BCP 175 / RFC 6557](https://www.rfc-editor.org/info/bcp175). This is what PHP and Craft already use internally. Not technically an ISO standard, but the de-facto global standard for time zone identification.+01:00,-08:00, orZfor UTC. A Time Zone field could optionally expose the current offset in this format.2026-05-12T14:30:00+02:00).2026-05-12T14:30:00+02:00[Europe/Berlin]. Useful for systems that want to preserve the named zone alongside the offset.zone.tab/zone1970.tabto associate zones with countries. Could be used to power the "group by country" display option.Suggested display formats in the field settings:
Europe/BerlinUTC+01:00(with a note that this changes with DST)[Europe/Berlin]Beta Was this translation helpful? Give feedback.
All reactions