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?
Go to C:\xampp\php\php. ini , or your custom path where php. ini is, open it. Look for the following: date.
The date/time functions allow you to get the date and time from the server where your PHP script runs. You can then use the date/time functions to format the date and time in several ways. Note: These functions depend on the locale settings of your server.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With