I am searching for PHP code which can get automatically timezone of client side. I had searched, and I found javascript who get timezone. How can I convert and use JavaScript in PHP to get timezone automatically?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
function get_time_zone_offset( ) {
var current_date = new Date( );
var gmt_offset = current_date.getTimezoneOffset( ) / 60;
return gmt_offset;
}
$('#offset').html( get_time_zone_offset( ) );
</script>
Please help me to convert this code into PHP and call this function into echo.
I will be very thankful to you guys.