Closed
Description
Just as LanguageType etc provide translated options, the TimezoneType should as well. It could do so using http://php.net/manual/en/intltimezone.getdisplayname.php (PHP >= 5.5).
IntlTimeZone::getDisplayName
returns the same name for each UTC offset. So we probably would not display it for each timezone but instead allow grouping over different things. I'd suggest to add some form of grouping option that can be region|country|name|offset
.
- region (default): stays as currently done, e.g.
Europe
- country: group by
DateTimeZone::getLocation()['country_code']
and translate withLocale::getDisplayRegion
- name: group by
IntlTimeZone::getDisplayName
, e.g.Central European Standard Time (CET)
- offset: group by
IntlTimeZone::getRawOffset
asUTC+x
With #12148 it would be easy to implement by just setting a default group_by
closure that - based on the above option - calls the appropriate methods.