If your server is on a different location and you need a synchronization with it to get in the proper time. Then you need to get the correct time according to that specific location.
To do so the timezone to the specific location.
This can be done by using the function :
date_default_time_zone_set("Location");
The location here specifies the specific location of which we require the time.
example:
<?php
date_default_time_zone_set("England/London");
echo "The time is " . date("h:i:sa");
?>
0 Comment(s)