Created
July 20, 2014 16:25
-
-
Save chiraggude/3c3acf5977ce3c49e84a to your computer and use it in GitHub Desktop.
Helper function to list Timezones
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getTimezones() | |
{ | |
$zones_array1 = []; | |
$timestamp = time(); | |
$timezones1 = timezone_identifiers_list(); | |
foreach($timezones1 as $key => $zone) | |
{ | |
date_default_timezone_set($zone); | |
$zones_array1[$zone] = 'UTC '. date('P', $timestamp) .' - '. $zone; | |
} | |
return $zones_array1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment