For the past month and a half apparently, my MODX install has been generating “invalid date.timezone value”. This went un-noticed because the website has been preforming well and no errors showed on any page. It was noticed yesterday when we updated to 2.8.4 (had been 2.8.3 previously) and the error starting showing during the install process on the setup pages.
The primary error we are seeing is (from server error log in modx directory):
[07-Jun-2022 00:29:24 UTC] PHP Warning: date(): Invalid date.timezone value 'UTC-4', we selected the timezone 'UTC' for now. in /path/to/core/xpdo/xpdo.class.php on line 2075
From the MODX error log just now:
[2022-06-07 00:39:47] (ERROR @ /path/to/core/model/smarty/sysplugins/smarty_internal_runtime_codeframe.php : 48) PHP warning: strftime(): Invalid date.timezone value 'UTC-4', we selected the timezone 'UTC' for now.
During the setup process the error messages mentioned other file names. But the same warning. And the update went ok.
My hosting provider doesn’t see anything wrong at their end and no changes were made around the time of the error start.
Any ideas what might be happening?
Environment
MODX 2.8.3 when error started showing, now MODX 2.8.4 still same error
PHP 7.4
Apache 2.4.53
No extras or custom modules
MySQL 5.7.38
@dejaya Yes one would expect “America/New York” not “UTC-4”. And that is part of the mystery, where is the value “UTC-4” coming from? The server is set to UTC.
@halftrainedharry Thanks, setting that to America/New_York seems to have done the trick. Though I am still at a loss why the timezone would suddenly crop up as an issue. The website has been working just fine for ages.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.