fork download
<?php

$tz = date_default_timezone_get(); // or your timezone of choice
$dt = new DateTime;
$dtz = new DateTimeZone($tz);
$off = $dtz->getOffset($dt);
$s = $off >= 0;
$h = abs(floor($off / 3600));
$m = abs($off % 3600);

printf("(GMT%s%02d:%02d) %s", $s ? '+' : '-', $h, $m, $tz);
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
(GMT+00:00) Europe/London