<?php
if (!isset($_GET['tzinfo'])) {
?>
<html>
<script type="text/javascript">
var d = new Date()
var tza = d.toLocaleString().split(" ").slice(-1)
var tzo = d.getTimezoneOffset()
window.location = window.location + '?tzinfo=' + tza + '|' + tzo
</script>
</html>
<?php
} else {
list( $abbr, $offset ) = explode( '|', $_GET['tzinfo'] );
echo timezone_name_from_abbr( $abbr, $offset * -60 );
}
?>
Output