-
☆ A M B ☆
- 2,475 Posts
Your system timezone is incorrectly set inside your php.ini, so the datestamps sent to the log are throwing that error because it uses PHP's date() function. Fix the issue with your timezone by altering your php.ini file. I can suppress the errors in a future version, but that doesn't make them go away.
Thanks for your reply. What do you mean by system timezone is incorrectly set. What do I have to set to make it work properly? The "Default timezone" is exactly my timezone. Which value do I have to change?
-
☆ A M B ☆
- 2,475 Posts
How you adjust this depends entirely on your server and how PHP is configured. You can configure PHP to use any timezone you want, so I personally don't buy your support team's alibi there. To test this, just make a simple php file that uses the date() function and see if it throws errors. This type of discussion comes up all the time and it tends to highlight system admins who may not have a good understanding of PHP. That may sound harsh, but if I had a nickel...
-
MODX Staff
- 10,725 Posts
Since PHP 5.2, it is required that the date.timezone value is set in the configuration, otherwise the PHP errors you are seeing will be triggered OR every PHP application you use will have to be modified to call date_default_timezone_set() before anything else happens.
In MODX 2.2, this is now done, but if you do not have a proper value, you will be set to UTC time. If your MySQL server also is set to use UTC, you will be fine, but in most cases, MySQL will get the proper timezone of the server itself and use it. If your PHP is using UTC and MySQL something else, the times will not match properly and all sorts of unexpected behavior can ensue in MODX.