<?php
+
/**
* Generates a list of available timezone continents and cities.
*
// Try to split the provided timezone
$spos = strpos($preselectedTimezone, '/');
$pcontinent = substr($preselectedTimezone, 0, $spos);
- $pcity = substr($preselectedTimezone, $spos+1);
+ $pcity = substr($preselectedTimezone, $spos + 1);
}
$continents = [];
}
$continent = substr($tz, 0, $spos);
- $city = substr($tz, $spos+1);
+ $city = substr($tz, $spos + 1);
$cities[] = ['continent' => $continent, 'city' => $city];
$continents[$continent] = true;
}
function isTimeZoneValid($continent, $city)
{
return in_array(
- $continent.'/'.$city,
+ $continent . '/' . $city,
timezone_identifiers_list()
);
}