What you are asking are IDs of Microsoft Windows time zones (here). PHP uses IANA/Olson time zones. See the timezone tag wiki for details.
From PHP official documentation, you can try this:
<?php
$timezones = DateTimeZone::listAbbreviations();
$cities = array();
foreach( $timezones as $key => $zones )
{
foreach( $zones as $id => $zone )
{
/**
* Only get timezones explicitely not part of "Others".
* @see http://www.php.net/manual/en/timezones.others.php
*/
if ( preg_match( '/^(America|Antartica|Arctic|Asia|Atlantic|Europe|Indian|Pacific)\//', $zone['timezone_id'] ) )
$cities[$zone['timezone_id']][] = $key;
}
}
// For each city, have a comma separated list of all possible timezones for that city.
foreach( $cities as $key => $value )
$cities[$key] = join( ', ', $value);
// Only keep one city (the first and also most important) for each set of possibilities.
$cities = array_unique( $cities );
// Sort by area/city name.
ksort( $cities );
?>
Here another SO question that you can look, there are lots of similar answers: Generating a drop down list of timezones with PHP
If none of this helps, you can try the above code, to convert
the data to your timezone. For example let us assume we have a UTC date and time string (2017-08-05 02:45) that we would like to convert to ACST (Australian Central Standard Time).
<?php
$utc_date = DateTime::createFromFormat(
'Y-m-d G:i',
'2017-08-05 02:45',
new DateTimeZone('UTC')
);
$acst_date = clone $utc_date; // we don't want PHP's default pass object by reference here
$acst_date->setTimeZone(new DateTimeZone('Australia/Yancowinna'));
echo 'UTC: ' . $utc_date->format('Y-m-d g:i A'); // UTC: 2017-08-05 02:45 AM
echo 'ACST: ' . $acst_date->format('Y-m-d g:i A'); // ACST: 2017-08-05 14:15 PM
Hope it helps!
UPDATE:
From here, you have a Windows ids timezone to PHP:
AUS Central Standard Time,1,Australia/Darwin
AUS Central Standard Time,AU,Australia/Darwin
AUS Eastern Standard Time,1,Australia/Sydney
AUS Eastern Standard Time,AU,Australia/Melbourne
AUS Eastern Standard Time,AU,Australia/Sydney
change to a php array:
$timezonesArray =
['AUS Central Standard Time','1','Australia/Darwin',
'AUS Central Standard Time','AU','Australia/Darwin',
'AUS Eastern Standard Time','1','Australia/Sydney',
'AUS Eastern Standard Time','AU','Australia/Melbourne',
'AUS Eastern Standard Time','AU','Australia/Sydney',
'Afghanistan Standard Time','1','Asia/Kabul',
'Afghanistan Standard Time','AF','Asia/Kabul',,
'Alaskan Standard Time','1','America/Anchorage',
'Alaskan Standard Time','US','America/Anchorage',
'Alaskan Standard Time','US','America/Juneau',
'Alaskan Standard Time','US','America/Nome',
'Alaskan Standard Time','US','America/Sitka',
'Alaskan Standard Time','US','America/Yakutat'];
//... the array continues
and then you can make a function to translate your timezone (array position 2) with your desired windows id (array position[0]), with find or whatever you want.
It's a not the more elegant solution I guess but it will work and its simple. You can search over the array and return the required translation
from one codification to the other.
Hope it helps now, happy coding!