How to set the time zone (php)

How to make your php application is using different time zone then server. Can use the script as below.

$time_offset ="0"; // Change this to your time zone
$time_a = ($time_offset * 120);
$time = date("h:i:s",time() + $time_a);
echo 'Current time is : '.$time;

Leave a Reply

Your email address will not be published. Required fields are marked *