Invalid timezone
-
My site health was reporting a critical error with an invalid timezone:
PHP default timezone was changed after WordPress loading by a
date_default_timezone_set()function call. This interferes with correct calculations of dates and times.The cause was traced back to the Countdown Timer plugin. Commenting out lines 147–150 of
fergcorp_countdownTimer.phpfixed the issue:$tz = get_option('timezone_string');
if ( $tz ){ //Get and check if we have a valid time zone...
date_default_timezone_set($tz); //...if so, use it
}This was in a PHP 8.3 environment.
You must be logged in to reply to this topic.