Hi all,
I just migrated from a Plesk Onyx at Centos6 to a Plesk Obsidian at Centos7 with my sites. However I have multiple issues with Wordpress sites, and they all seem to be caused by issues with UTC time in PHP7.3.
The issue is that PHP does not display the correct UTC time, however all other timezones are displayed correctly (GMT, CEST).
On my old server (Centos6-Onyx-PHP7.3.16) this does not happen. There is UTC the same as GMT, but on my new server (Centos7-Obsidian-PHP7.3.16) the local time is displayed at UTC instead of the real UTC time.
See the example below. The UTC time on the new server is 21.0x while it should be 19.0x (as on the old server).
new server output:
old server:
Of course I tried a lot to fix the issue. Changing php.ini, changing server timezone etc. But still issue persists.
It looks like that the timezonedb is wrong in the plesk-php. I even tried to use the new timezonedb from pecl. But I could only update the system php version with that, and that fixed the issue for the old 5.x system php version. But of course could not/dont want to change the php version from plesk.
So the problem persists, and I am clueless.... Any ideas how I can fix this?
Thanks in advance for help and thoughts.
Jan-Pieter
I just migrated from a Plesk Onyx at Centos6 to a Plesk Obsidian at Centos7 with my sites. However I have multiple issues with Wordpress sites, and they all seem to be caused by issues with UTC time in PHP7.3.
The issue is that PHP does not display the correct UTC time, however all other timezones are displayed correctly (GMT, CEST).
On my old server (Centos6-Onyx-PHP7.3.16) this does not happen. There is UTC the same as GMT, but on my new server (Centos7-Obsidian-PHP7.3.16) the local time is displayed at UTC instead of the real UTC time.
See the example below. The UTC time on the new server is 21.0x while it should be 19.0x (as on the old server).
new server output:
[root@h2879813 ~]# cat /etc/centos-release
CentOS Linux release 7.7.1908 (Core)
[root@h2879813 ~]# timedatectl
Local time: di 2020-04-14 21:00:06 CEST
Universal time: di 2020-04-14 19:00:06 UTC
RTC time: n/a
Time zone: Europe/Amsterdam (CEST, +0200)
NTP enabled: no
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
zo 2020-03-29 01:59:59 CET
zo 2020-03-29 03:00:00 CEST
Next DST change: DST ends (the clock jumps one hour backwards) at
zo 2020-10-25 02:59:59 CEST
zo 2020-10-25 02:00:00 CET
[root@h2879813 ~]# /opt/plesk/php/7.3/bin/php -a
Interactive shell
php > date_default_timezone_set( 'GMT' );
php > echo date('Y-m-d G:i:s');
2020-04-14 19:00:20
php > date_default_timezone_set( 'UTC' );
php > echo date('Y-m-d G:i:s');
2020-04-14 21:00:28
php > date_default_timezone_set( 'Europe/Amsterdam' );
php > echo date('Y-m-d G:i:s');
2020-04-14 21:00:36
php >
old server:
[root@h2429770 ~]# cat /etc/centos-release
CentOS release 6.10 (Final)
[root@h2429770 ~]# date
Tue Apr 14 21:02:41 CEST 2020
[root@h2429770 ~]# /opt/plesk/php/7.3/bin/php -a
Interactive shell
php > date_default_timezone_set( 'GMT' );
php > echo date('Y-m-d G:i:s');
2020-04-14 19:03:03
php > date_default_timezone_set( 'UTC' );
php > echo date('Y-m-d G:i:s');
2020-04-14 19:03:14
php > date_default_timezone_set( 'Europe/Amsterdam' );
php > echo date('Y-m-d G:i:s');
2020-04-14 21:03:26
php >
Of course I tried a lot to fix the issue. Changing php.ini, changing server timezone etc. But still issue persists.
It looks like that the timezonedb is wrong in the plesk-php. I even tried to use the new timezonedb from pecl. But I could only update the system php version with that, and that fixed the issue for the old 5.x system php version. But of course could not/dont want to change the php version from plesk.
So the problem persists, and I am clueless.... Any ideas how I can fix this?
Thanks in advance for help and thoughts.
Jan-Pieter
Last edited: