Skip to content

Commit

Permalink
Fix #17751: add 'UTC' to timezone selection list
Browse files Browse the repository at this point in the history
Also fixes the list for timezones containing a '/' in the name (e.g.
Argentina/xxx)
  • Loading branch information
dregad committed Dec 14, 2014
1 parent 257c1fe commit f350dbc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions core/print_api.php
Expand Up @@ -1918,11 +1918,17 @@ function print_timezone_option_list( $p_timezone ) {

$t_identifiers = timezone_identifiers_list( DateTimeZone::ALL );

foreach ( $t_identifiers as $t_identifier ) {
$t_zone = explode( '/', $t_identifier );
if( isset( $t_zone[1] ) != '' ) {
$t_locations[$t_zone[0]][$t_zone[0] . '/' . $t_zone[1]] = array( str_replace( '_', ' ', $t_zone[1] ), $t_identifier );
foreach( $t_identifiers as $t_identifier ) {
$t_zone = explode( '/', $t_identifier, 2 );
if( isset( $t_zone[1] ) ) {
$t_id = $t_zone[1];
} else {
$t_id = $t_identifier;
}
$t_locations[$t_zone[0]][$t_identifier] = array(
str_replace( '_', ' ', $t_id ),
$t_identifier
);
}

foreach( $t_locations as $t_continent => $t_locations ) {
Expand Down

0 comments on commit f350dbc

Please sign in to comment.