Skip to content
Advertisement

XAMPP PHP date function time is different from local machine time

My computer local time is 12-03-2013 4:30pm.

My XAMPP date function prints the time as 12-03-2013 10:49:56.

How can I set the XAMPP server time to display the system time?

Advertisement

Answer

Go to C:xamppphpphp.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.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement