I am working on a couple compatibility issues with upgrading from PHP 5.6 to 7.2. As far as I can tell, this issue is not related to that.
Suddenly a few hours ago, I noticed the times for my events are all showing UTC instead of my timezone (UTC -8/Los Angeles). I checked the WP setting for timezone and it is still correct. This site has been running for 5 years now. I am using a CPT called Events, and using the Types' Date/Time custom field for start and end times. Both are displaying wrong. However, it only displays wrong if I am logged in to WordPress. If I am not logged in, it displays correctly. I just spent over 3 hours trying to track this down and can't figure it out.
This problem is occuring on my live site (PHP 5.6), and two clones. One clone I can switch back and forth between PHP 5.6 and 7.2 but that makes no difference. So, I assume it is therefore not related to my PHP upgrades. So, since I updated all my Toolset plugins a few days ago, I am now looking in that direction.
The most recent Upcoming Event was already created last month or more and was fine then. But, even if I now create a new event, set the start/end times to say 7 PM to 9 PM, when I save it, Views displays it as 12 PM to 2 PM.
I'm going to set up a test site to see if I can reproduce the problem.
Can you confirm, these events are published from the back-end or using a front-end form?
You say the times are displaying incorrectly, from your description you mean when outputting them on the front-end, yes?
While I'm at it, can I get credentials for a site where I can see the problem? Give me a URL where I can see the issue.
I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
Thanks for the timely reply.
I am using an old wp-types starter theme, "views_base" and since OTGS hasn't supported it for a few years, I do the best to maintain it myself, primarily through a child theme. Occasionally, when WP has depricated functions, I've had to update the original theme files. Anyway, over the past couple weeks, I've been making updates for a PHP 7.2 upgrade.
I have now narrowed this issue down to something on the child theme side; likely in header.php or functions.php. So, can we let this post hang for a day or two, and hopefully I will have it resolved in that time and we can then close it.