my wordpress shows the wrong time,
enter image description here

UTC time on the picture should be 18:06:28 and localtime 15:06:28, so the UTC time is showed as local time, I use my own vps on digital ocean and time zone is correct,

ls -l /etc/localtime
lrwxrwxrwx 1 root root 36 Apr 19 23:20 /etc/localtime -> /usr/share/zoneinfo/America/Santiago

also I have anothers php scripts on the server and the time is correct, cron job for whmcs for example works perfect, this is my config time on wordpress

enter image description here

How to fix this?, the problem is in all my wordpress websites, and the woocommerce websites has the wrong time on order too.

I use php 7 and last wordpress

I already tried with timezone in php.ini and in global php config I have America/Santiago

date on server is ok

root@server:~# timedatectl
      Local time: Fri 2018-04-20 22:15:40 -03
  Universal time: Sat 2018-04-21 01:15:40 UTC
        RTC time: Sat 2018-04-21 01:15:40
       Time zone: America/Santiago (-03, -0300)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

php too

php > echo date_default_timezone_get(time());
America/Santiago

3 Answers
3

This might be a solution for you:
https://wordpress.org/support/topic/utc-time-and-local-time-problems/

It says that it’s a problem with PHP config, not WordPress.

(Bringing the solution here for ease of reference)

  1. If you have shell access, do you get the correct date/time when you type “date” at the command line? If that’s wrong, contact your host.

  2. Try adding the correct timezone to php.ini: http://www.inmotionhosting.com/support/website/php/setting-the-timezone-for-php-in-the-phpini-file (And check if that is displaying the right zone)

  3. Check your plugins, if any of them modifies anything on WordPress clock. On the link I sent above the case was solved by deactivating a calendar plugin.

Both these links below can help with your search too, I can’t point at what could solve it since there’s missing information on this topic about what they say there, but I hope it shine some light into your problem!

https://wordpress.org/support/topic/utc-time-wrong/page/2/

Fixing UTC time – wordpress effects

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *