<?php
date_default_timezone_set('UTC');
$utc = new DateTimeZone('UTC');
$time = DateTime::createFromFormat('Y-m-d H:i:s', '2014-05-19 11:30:00', $utc);
foreach (array('UTC', 'Europe/London', 'BST', 'Etc/GMT+1', 'GMT+1', 'CEST', 'EST', 'GMT-5') as $abbr) {
try {
$zone = new DateTimeZone($abbr);
} catch (Exception $e) {
echo "{$abbr}: ERROR - {$e->getMessage()}", PHP_EOL;
}
echo "{$abbr}: {$zone->getOffset($time)}", PHP_EOL;
}
preferences:
48.07 ms | 402 KiB | 5 Q