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 resolved by changing a setting in PHP called date.timezone.
Depending on your location you can set a specific date.timezone value in PHP using the following option which should be added to your local php.ini file:
date.timezone = "US/Central"
The above example assumes you'd like to set the timezone for your PHP scripts to US/Central.