Yadheendran Yadheendran - 1 year ago 166
PHP Question

XAMPP php date function time is different from local machine time

How to set the XAMPP Server time correctly.

My Computer Local time is showing 12-03-2013 4:30pm where the XAMPP date function prints time 12-03-2013 10:49:56.

So Please suggest me that how to change the XAMPP Server time in order to display equal to the System time.

Sorry for my bad English.

Answer Source

Go to C:\xampp\php\php.ini, or your custom path where php.ini is, open it.

Look for the following: date.timezone = "Europe/Warsaw". Probably You have different value than my Europe/Warsaw. So search just string: date.timezone.

Change value Europe/Warsaw to the proper value, for example date.timezone = "Asia/Kolkata"

If someone's looking for his location, check valid values http://php.net/manual/en/timezones.php

Don't forget to restart your XAMPP.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download