Posted: October 8, 2015 at 9:33 am
|
I am running EE4 Version 4.8.14.p I have created an event with a specified start and end time, but when the event is published, something completely different appears. Take a look at the event link According to the displayed page, the event starts on December 5th at 9:00am and ends on December 6th at 2:00am When I created the event I specified that it should start on December 5th from 11:00am to 3:00pm Any suggestions? |
|
And update on this issue. The system time in my WordPress configuration was wrong, so that issue is not fixed. But events are being displayed 5 hours earlier then they are supposed to. The event is now being displayed from 6:00am to 10:00am, which is 5 hours off |
Normally this happens when another plugin is using date_default_timezone_set() which is discouraged within WordPress, mentioned here: and https://weston.ruter.net/2013/04/02/do-not-change-the-default-timezone-from-utc-in-wordpress/ Do you have any other plugins that deal with anything date or time based? This could be a calendar, post scheduler etc. |
|
|
Tony, I have no idea if I have a plugin that could be screwing this up. ๐ Let me ask this question before I start to troubleshoot what is going on. If I go into Settings -> General settings, What should the timezone value be set to? Should I set it to New York, or use UTC -4 (which I believe is the current time zone value). |
Hi Michael, You should use a city/region in your time zone rather than a UTC setting. Are you using any bookings / appointments / other calendar plugins on your site? If so, they may be interfering as Tony shared: https://eventespresso.com/topic/completely-wrong-date-and-time-is-being-displayed/#post-176331 — |
|
|
OK….I have changed the timezone setting to New York, and the time is still displayed incorrectly. I went through the list of plugins, and I don’t see any plugins that have anything to do with bookings, appointments, or other calendars. Any suggestions? |
Okay, have you tried temporarily deactivating all plugins and reactivating only Event Espresso 4? Does the time still appear to be incorrect? What happens if you create a new event and publish it? Is that time still incorrect as compared to what was selected and saved in the event editor? — |
|
|
I disabled every plugin (except for ee4), created new events, and the time displayed is still wrong. My theme has a calendar function, but obviously I am not using it. Without disabling my theme, how can I tell if the theme is causing the issue? |
Hi Michael, One way is to look in the theme for code, or ask the theme developer if they have code, like this in the theme’s functions:
Another way is to use the WordPress Customizer to preview your event page in another theme. You can preview your event page by going to one of your event pages like the one you linked to. You’ll need to be logged in, and you’ll click the Customize button on the bar. Then next to where it says “Active Theme”, you click Change, then you scroll down and click Live Preview on one of the other themes. If the times are correct when you’re previewing another theme, that’s a good indication that your theme is causing the issue. |
|
|
I think I found something…. This snippet of code is in the header.php file. $offset = get_option(‘timezone_string’); Is this code the culprit? |
|
Just to follow up…I did what you suggested, and viewed the page with another theme. The page looks just fine. ๐ I will reach out to the theme developer for support. Thanks for your help |
Hi Michael, Yes that code is likely the culprit.
You may be able to comment out that line and everything will work as expected although it depends on how heavily the theme is relying on that code so you are best contacting the developer to see what they advise. Please do let us know how you get on. |
|
The support post ‘Completely wrong date and time is being displayed’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.