In General settings, local time is shown as equivalent to (the correct) UTC time.
No other settings are shown below the error and there is no Save Changes button.
In logging, I see the following, when I grep
for timezone in a list of options with wp option list | grep -i zone
:
PHP Warning: timezone_open(): Unknown or bad timezone (America/Phoenix) in /var/www/union_made_sites/shirts/wp-includes/functions.php on line 5228
Warning: timezone_open(): Unknown or bad timezone (America/Phoenix) in /var/www/union_made_sites/shirts/wp-includes/functions.php on line 5228
timezone_string America/Phoenix
Here are the results of a test file that contains the following php code:
<?php
require_once("../../../../wp-load.php");
echo date('Y-m-d G:i:s');
?>
<p>
<?php
echo current_time('mysql');
?>
<p>
<?php
echo "This is GMT Offset:";
echo get_option('gmt_offset');
?>
I'm on Ubuntu, and I'm using /etc/php/7.3/apache2/php.ini
to configure mod_php
. I've set date.timezone explicitly in this file as follows:
date.timezone = "America/Phoenix"
I can confirm this particular .ini
file is loaded via phpinfo()
:
None of the plugins that are active are associated with calendars or scheduling.
In the wp_options
table of the database, the timezone_string
option has a value of America/Phoenix
, but gmt_offset
is an empty string.
Updating the table and setting gmt_offset
to -7
does nothing to improve things, aside from showing the correct local time in the General settings screen; wp-cli
still throws the same error, the warning regarding "technical difficulties" displays, and the bottom half of the General settings screen does not appear.