date_offset_get

its an alias of DateTime::getOffset()and returns the timezone offset .
Example

<?php
$time = date_create(‘2012-05-17’, timezone_open(‘America/New_York’));
echo date_offset_get($time) . “n”;
?>

Output

-14400

Share