Deprecate system_time_zones() and move to TimeZoneFormHelper

Created on 14 December 2018, about 6 years ago
Updated 4 June 2024, 7 months ago

Problem/Motivation

Much of the logic in system_time_zones() is outdated, as PHP now has the native ability to only return current timezones. While we're modernizing this logic, it makes sense to deprecate and remove (in Drupal 9) the old function.

Proposed resolution

Switch from using a regex to filter out old formats, and simply use \DateTimeZone::listIdentifiers(). At the same time, mark the old function deprecated and move this logic to Drupal\Core\Datetime\TimeZoneFormHelper::getOptionsList. Note, since this relies on Drupal\Core\StringTranslation\TranslatableMarkup, it can't go into a component such as DateTimePlus.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

10.1 ✨

Component
DatetimeΒ  β†’

Last updated 2 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States jhedstrom Portland, OR

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024