Daksh B
Daksh B

Reputation: 262

php date/time output mismatches the one shown on my system

I changed the timezone setting on my php.ini (xampp server) to date.timezone=Asia/Kolkata.

On my index.php I have this

date_default_timezone_set("Asia/Kolkata");
echo date('d-m-Y H:i:sa');

Result, I get is, 12-08-2015 11:42:49am, where as the actual date time at the time of running this script is 11-08-2015 11:12pm.

The date and time is like 12 hours apart from what actually it is.

Can you help.

Upvotes: 0

Views: 166

Answers (1)

Jonathan M
Jonathan M

Reputation: 17441

Check your system time, date and timezone in the windows control panel. Make sure it is accurate.

Upvotes: 1

Related Questions