]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/TimeZone.php
Minor code cleanup: PHPDoc, spelling, unused variables, etc.
[github/shaarli/Shaarli.git] / application / TimeZone.php
index e363d90a789207b821493a98a65270ba63b1ae97..36a8fb122ada91a1832f25944895f8aeca599288 100644 (file)
@@ -7,9 +7,9 @@
  * Example: preselect Europe/Paris
  *  list($htmlform, $js) = generateTimeZoneForm('Europe/Paris');
  *
- * @param string $preselected_timezone preselected timezone (optional)
+ * @param string $preselectedTimezone preselected timezone (optional)
  *
- * @return an array containing the generated HTML form and Javascript code
+ * @return array containing the generated HTML form and Javascript code
  **/
 function generateTimeZoneForm($preselectedTimezone='')
 {
@@ -27,10 +27,6 @@ function generateTimeZoneForm($preselectedTimezone='')
         $pcity = substr($preselectedTimezone, $spos+1);
     }
 
-    // Display config form:
-    $timezoneForm = '';
-    $timezoneJs = '';
-
     // The list is in the form 'Europe/Paris', 'America/Argentina/Buenos_Aires'
     // We split the list in continents/cities.
     $continents = array();
@@ -97,14 +93,10 @@ function generateTimeZoneForm($preselectedTimezone='')
  * @param string $continent the timezone continent
  * @param string $city      the timezone city
  *
- * @return whether continent/city is a valid timezone
+ * @return bool whether continent/city is a valid timezone
  */
 function isTimeZoneValid($continent, $city)
 {
-    if ($continent == 'UTC' && $city == 'UTC') {
-        return true;
-    }
-
     return in_array(
         $continent.'/'.$city,
         timezone_identifiers_list()