[Solved] Conflict with Event Espresso 4
Hi, when I activate Newsletter plugin EE4 shows all event time +1h. Deactivate Newsletter everything is o.k. with event time displayed in EE4.
What can that be?
Is there a problem with daylight saving time in the Newsletter plugin? It seem everything was o.k. before change of time to wintertime on 25th Nov.
Comments
@joachim_ch
I believe the issue is related to the timezone set under Settings in WordPress.
What is it currently set at?
If it is set to UTC something, can you change it to a city/country specific timezone and see if that resolves it?
I look forward to your response.
It is already set to local timezone:
See: http://take.ms/ZI4j3
Here is what the Event Espresso Support says:
November 5, 2015 at 5:12 am
Hi there,
I had a look at that plugin and can see it is using date_default_timezone_set() which is what is causing the problem.
WordPress expects the default timezone to always be UTC, once you change that, strange things start happening to anything that uses Dates, as EE is heavily reliant on date working correctly it shows up more, but the cause is the use of that function.
A couple of examples explain this can be found here:
https://weston.ruter.net/2013/04/02/do-not-change-the-default-timezone-from-utc-in-wordpress/
https://vip.wordpress.com/documentation/vip-development-tips-tricks/use-current_time-not-date_default_timezone_set/
Unfortunately there is no quick fix, if may be possible to just comment out that code from the plugin until the author can add a proper fix, although you will need to check with them if this would work.
http://eventespresso.com/topic/different-time-single-event-widget-and-calendar-add-on-event-list/#post-179435
@joachim_ch
I hope you are doing well.
We have fixed the problem and replied to your ticket.
The solution was to not execute/change the date_default_timezone_set() function as you mentioned. We are applying this change to the latest development of our WordPress Newsletter plugin as well to prevent the conflict in the future.
I'll mark this as [Solved]