eLIANT

Active Member
Aug 14, 2006
30
3
158
I want everything to display in Eastern timezone for all accounts on my server. Yes, there are many posts in this and other forums about this, but I can't find the combination of changes that makes everything work.

In server WHM (not account cPanel) I made the following changes:
I've set server time under Server Configuration.
I've updated date.timezone in MultiPHP INI Editor, using the Editor Mode tab.
In MultiPHP Manager, tab User Domain Settings, all domains set to inherit.

In cPanel of a particular existing (not new regarding inheritance) account, I made these changes:
In MultiPHP INI Editor, using the Editor Mode tab, I added the desired date.timezone value in /home/<account>/public_html/php.ini

In WordPress Settings, timezone is set as desired.

As a test, I added this to a custom 'init' function:
$T = date_default_timezone_get();
die($T);

Restarted server.
visited WordPress site previously mentioned.
On-screen result: UTC

Error logs are in UTC.

What am I missing?
 

eLIANT

Active Member
Aug 14, 2006
30
3
158
WordPress: Settings>General>Timezone

Log: /home/<account>/public_html/error_log
time stamp of example entry: "[08-Apr-2022 21:46:00 UTC] "
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,443
2,114
363
cPanel Access Level
Root Administrator
Thanks for that. I checked the WordPress interface on one of my personal sites and confirmed that displayed properly as "America/Detroit" and the local error_log is also showing the correct timezone.

Can you open a PHP Info page and confirm the ini file that is being read?
 

eLIANT

Active Member
Aug 14, 2006
30
3
158
Running phpinfo() gives this informatoin:
Configuration File (php.ini) Path /opt/cpanel/ea-php74/root/etc
Loaded Configuration File /home/<account>/public_html/php.ini

Additional .ini files parsed blah...blah..., ./php.ini
(php.ini has this as its last line:
date.timezone = "America/Detroit")

phpinfo() displays in the "date" section...
... Default timezone America/Detroit

But what do you mean by " the local error_log is also showing the correct timezone."
I cause an intentional error and the error log updates but still has the UTC time stamp on the error line.

BTW - wp_post table timestamps are correct (Detroit)
 

eLIANT

Active Member
Aug 14, 2006
30
3
158
After additional digging, it appears only the PHP error log displays the UTC timestamp on the individual lines. But that's still a problem.

Ticket submitted.