Wrong PHP date() output in wamp server

2019-06-15 20:03发布

The problem is that date('r') returns wrong time for my timezone.

php.ini timezone setting:
date.timezone = Europe/Kiev

date_default_timezone_set('Europe/Kiev') in my script solves the problem.

So what's wrong with WAMP?

7条回答
Animai°情兽
2楼-- · 2019-06-15 20:50
  1. Open your php.ini with maybe notepad++, sublime text...
  2. Add this line to the file: date.timezone = "X" Where X is the your time-zone of wish. Get a list of supported timezones here: http://php.net/manual/en/timezones.php

... That should do it. 3. Restart your server

查看更多
登录 后发表回答