- timezone_abbreviations_list: documentation ( source)
<?php
function tz_offset_to_name($offset)
{
$offset *= 3600; // convert hour offset to seconds
$abbrarray = timezone_abbreviations_list();
foreach ($abbrarray as $abbr)
{
foreach ($abbr as $city)
{
if ($city['offset'] == $offset)
{
return $city['timezone_id'];
}
}
}
return FALSE;
}
echo tz_offset_to_name("5");