If your PHP scripts do not show the correct time, the reason is that most probably your hosting server is in a different timezone. This can be easily done by changing a setting using PHP called date.timezone.
Depending on your location you can set a specific date.timezone value in PHP using the option below which should be added to your local php.ini file :-
date.timezone = “Pacific/Auckland”
The example given above assumes you’d like to set the timezone for your PHP scripts to Pacific/Auckland. The full list of supported time zones is available here and you should simply replace “Pacific/Auckland“ with the desired timezone.
Example Script :-
echo $today = date(“D M j G:i:s T Y”);