Recurring Event Times Error

Home Forums Calendar Products Events Calendar PRO Recurring Event Times Error

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #198831
    kevincdaughtry
    Participant

    When I setup a new recurring event, my first entry displays correctly… but every recurring event changes to be several hours later than my initial settings. I placed the time from 10:30 am to 11:30 am… but the recurring events all list as from 2:30 pm to 3:30 pm. I’ve uninstalled Events Calendar and Events Calendar Pro…. but still the same issue returns. My calendar is here – http://covenantfamily.cc/events/

    Please help… I’ve been dealing with this issue for a long time.

    #199888
    Barry
    Member

    Hi Kevin,

    We received another similar report recently with two other customers detailing something very similar – so we’d love to get to the bottom of this. Sadly, so far, we haven’t been able to replicate. If you can fill in some blanks that could be massively useful:

    • What is your timezone setting (in WordPress’s General Settings admin screen)?
    • Is it an offset such as UTC-8 or a geographic name such as America/Los Angeles?
    • Does this happen when you create any new chain of recurring events, or only if you create an event initially and then convert it to a set of recurring events?
    • Can you confirm this occurs even with no other plugins but The Events Calendar and Events Calendar PRO running and only a default theme (and can you be sure to test out creating a new event under these conditions)?

    The closest known issue to this I am aware of was a conflict with a plugin called Series Engine, but it’s not impossible that there is some other issue in our own codebase or a conflict with a different plugin we are unaware of.

    Thanks for your help!

    #203778
    Joel
    Participant

    Barry,
    I’m having the same problem with my calendar. I followed your steps and nothing seems to give, the same problem occurs no matter what. It seems to kick the event four hours later whether you create a single event and convert it, or create a recurring event originally. I thought it had to do with a timezone malfunction but after checking several times, it doesn’t. Any new thoughts on the matter? Hope my trouble-shooting helped a bit. Thanks!

    For Reference: http://www.churchinthepines.org/events/2014-06/
    ^ Original event on June 8th is correct, but the recurring ones get pushed forward four hours.

    #287459
    vccc
    Participant

    I have the same issue when using the calendar. The first event is correct, yet all of the reoccurring events are consistently several hours later. I have to manually go in and separate each from the group and change it back to the correct time.

    #456953
    snmmuk
    Participant

    I am also having the exact same issue.

    http://www.specialtynaturalmedicine.com/events/

    #457186
    snmmuk
    Participant

    I just went through the process of deactivating all my plug-ins, and the reactivating them one at a time to see which one was the issue… and now the problem is gone.

    Bizarre, but I will take the workaround.

    #457268
    snmmuk
    Participant

    FYI.. I was able to duplicate by re-enabling an old scheduling tool

    Weekly Class Schedule

    Weekly Class Schedule generates a weekly schedule of classes. It provides you with an easy way to manage and update the schedule as well as the classes and instructors database.
    Version 3.11 | By Pulsar Web Design |

    #641833
    kevincdaughtry
    Participant

    I believe I found the issue and a solution.

    Series Engine was changing the default timezone to the one selected in my WP Settings (which was not UTC). Everything works fine for a single event because the date/time for the event is saved in the database and returned all in the default timezone, whatever that may be. When it comes to a recurring event the Events Calendar Pro plugin converts the date/time of the future events to a timestamp, which automatically converts to UTC and adjusts the time. The times then stay in UTC and are ouput as UTC as well, which causes the adjusted time. I was able to fix it by adding the follow code:

    // Fix for start date
    $this->start_date->setTimezone(new DateTimeZone(get_option(‘timezone_string’)));

    This goes in lib/tribeeventspro-recurrenceinstance.php inside the TribeEventsPro_RecurrenceInstance::__construct() method right after the line:
    $this->start_date = new DateTime(‘@’.$start_date);

    // Fix for end date
    $end_date->setTimezone(new DateTimeZone(get_option(‘timezone_string’)));

    This also goes in lib/tribeeventspro-recurrenceinstance.php inside the TribeEventsPro_RecurrenceInstance::save() method right after the line:
    $end_date = $this->get_end_date();

    #650541
    Barry
    Member

    Firstly – apologies to everyone who posted between my last reply and Kevin’s most recent reply.

    Unfortunately we are not notified when someone other than the original poster updates the topic – that’s a glitch on our side but please note we do anyway recommend creating fresh topics of your own if you’re experiencing difficulties as even though the problem may look similar that underlying cause may be different.

    For example, it sounds like Series Engine is not the only plugin to create this sort of condition and so the solution will not necessarily be the same for everyone.

    Series Engine was changing the default timezone to the one selected in my WP Settings (which was not UTC).

    Thanks for digging into this, Kevin – so it was indeed Series Engine which was the culprit.

    Working around this as you described is a possible way to resolve the situation but we never recommend hacking core plugin code – doing so carries some added risk, not least that you can lose your customizations on a future update.

    I also wonder if this wouldn’t be worth taking to the Series Engine developers: on our side we (reasonably) assume the system default timezone will be UTC because WordPress itself sets it as such and provides the extra functionality needed to calculate offsets.

    If Series Engine – or some other plugin  – subsequently changes this it is indeed going to be problematic and I wonder if it wouldn’t be better for them to come in to line with the main WordPress application in this regard?

     

    #650731
    kevincdaughtry
    Participant

    Barry,

    I completely agree with your statement on hacking core plugin code, and I was reluctant to do so. However there didn’t appear to be another simple fix. Making a simple change to Series Engine to fix this issue would further complicate it by breaking Series Engine and I didn’t see a way to fix this without touching a plugins core code.

    I also agree that you are reasonable to assume that the timezone will be UTC, and you are doing everything according to WordPress standards. However as you mentioned Series Engine does not appear to be the only plugin/theme that is not following those standards. And if it’s possible for you to add a couple lines of code to fix the issue (whether it’s the ones I provided or not) it would be very much appreciated by your customers. I have also seen other posts on this same topic, so in the long run I would imagine it would be beneficial for your support team and the satisfaction of your customers to resolve this issue, even if you’re not to blame.

    I appreciate all of your help!

    #650852
    Barry
    Member

    Great minds think alike – you raise some valid points there and we were quite literally just discussing the same thing within the team.

    We’ll definitely have a further think and consider making a change on our end, thanks again!

    #651730
    kevincdaughtry
    Participant

    Thanks Barry! And after thinking it over more get_option(‘timezone_string’) probably isn’t the best thing to convert the timezone to, because it assumes the timezone has been set to the timezone select in the WP Settings. Probably date_default_timezone_get() would be more generic.

    Thanks again for taking the time to respond!.

    #654478
    Barry
    Member

    No problem. I’ll go ahead and close out this thread but I’ve linked it to the bug report (on our internal tracker) and we’ll do our best to post an update once a fix is in place.

    Thanks 🙂

    #769004
    Leah
    Member

    Hi there,

    Thanks for bringing this issue to our attention. We weren’t able to get to it for our upcoming 3.8 release, but it is still very much on the radar. We hope to have it fixed in an upcoming release, and we will do our best to keep you posted on our progress. Thanks for your patience and support!

    Best,
    Leah
    and the team at Modern Tribe

    #909454
    Leah
    Member

    Hello,

    I just wanted to update you here and let you know that we have a fix for the issue you reported in our upcoming release. Thank you for bringing it to our attention! Keep an eye out for an update coming soon. If you are still experiencing issues after the update, please start a new thread and we’d be happy to look into it. Thank you for your patience and support while we got this corrected.

    Best,
    Leah

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Recurring Event Times Error’ is closed to new replies.