Support

Home Forums Event Espresso Premium Can't change incorrect event time

Can't change incorrect event time

Posted: December 2, 2019 at 11:49 am


thinkbiglearnsmart

December 2, 2019 at 11:49 am

Some of our events have started displaying the incorrect times. They’re showing up in UTC instead of EST, though EST is still listed. And when we edit the event to correct it, the newly entered times are not saved.

Example: on this page – https://thinkbiglearnsmart.com/illustrator-creative-cloud-training-classes-advanced/ if you click on “Dates to Register” the Dec 18 class should start at 8:30am EST like all the others. When we attempt to edit, the changes are not saved.

The general WP time setting is for New York, and you can see the other times are correct. This is happening for quite a few events.


Josh

  • Support Staff

December 2, 2019 at 12:07 pm

Hi,

It looks like your site was updated to WordPress 5.3. One of the big changes included in WordPress 5.3 was the datetime component improvements. If your site has any plugins or custom code that use the date_default_timezone_set() function, you’ll need to update those so they’re compatible with WordPress 5.3.

This includes updating to the later version of Event Espresso 3, which it looks like your site already has.


thinkbiglearnsmart

December 2, 2019 at 12:41 pm

Yes, we updated EE to see if it would fix the issue, but it didn’t. We do have a customizations plugin and other customizations in the uploads/espresso folder, but I did a search on the code for that function and it’s not present.

I see a reference to $event->timezone_string in a function in our plugin. Is there somewhere else we should look? New events entered with the correct time are also showing up wrong.


Josh

  • Support Staff

December 2, 2019 at 12:51 pm

The first thing to do would be rule out any other plugin on the site that uses date_default_timezone_set(). EE3 has removed those, but if another plugin is using that function, you’ll have the same problem.


thinkbiglearnsmart

December 2, 2019 at 3:41 pm

I cloned the site and turned off all other plugins other than EE. It still would not allow me to edit the event times. It was only after I changed the Time Format under Settings General from Custom: g:i a T to the standard g:i a (without the time zone) that we are able to edit the event times.

Since we offer online classes we’d like to be able to include the time zone, but this seems to be a bug.


thinkbiglearnsmart

December 16, 2019 at 9:44 am

Hey, just checking back in on this. Can you all verify this as a bug? Any idea on ETA for a fix?


Josh

  • Support Staff

December 16, 2019 at 10:41 am

I can’t verify this is a bug. EE3 does have an option in its General Settings page where you can set ” Use a custom time zone for each event?” to yes. Then, when you input the event’s time, you can set the time zone in an option. Then, when you input the times you do not include the timezone in the time string (only provide the time and am/pm if using 12 hour format).


thinkbiglearnsmart

December 16, 2019 at 12:55 pm

There does appear to be a bug when using the WordPress Settings > General custom timezone including the “T” for timezone. That produces the issue originally described where the times show up incorrectly in EE events.

When I check EE’s setting for “custom time zone for each event” it does not display “EST” or anything to indicate Eastern Time on the class display, which is what we’re looking to do, and why we were using the g:i a T format.


Josh

  • Support Staff

December 16, 2019 at 5:16 pm

Using the g:i a T format, on a WordPress 5.3 site, will result in the behavior you’re seeing.

I understand that your EE3 templates are customized, but the following code added to a functions file should add the timezone to the display when the “custom time zone for each event” is selected:

https://gist.github.com/joshfeck/a5b179dd8a1e18be9629d9dce9987239

You can add the above to a functions plugin or, if available, into your WordPress child theme’s functions.php file.

The support post ‘Can't change incorrect event time’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  Josh 6 months, 2 weeks ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!