Invalid date.timezone parameter in your php.ini . Make sure your time zone is set to the appropriate value:
date.timezone = Europe/Stockholm
If you do not have access to the php.ini , you can use date_default_timezone_set() to set it at runtime:
date_default_timezone_set('Europe/Stockholm');
See the PHP documentation for a list of supported time zones.
If it still does not work, make sure that your server has the correct time zone. If you set the time manually and the time zone is incorrect (but since the time was corrected manually, it still shows the correct time), PHP is not able to correctly get the UTC time and, therefore, returns the wrong time.
source share