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 either to DateHelper
. Note, since this relies on Drupal\Core\StringTranslation\TranslatableMarkup
, it can't go into a component such as DateTimePlus
.