Event Dates Displaying Incorrectly

Home Forums Calendar Products Event Aggregator Event Dates Displaying Incorrectly

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1370244
    Katie Dahl
    Participant

    I believe this may be related to my previous ticket: /time-incorrect-scheduled-import-wont-run/

    The fix you guys provided was great, but I think there may be an unforeseen issue with it:

    Some of my imported events are now showing incorrect days (a day after the event has completed). I think this may be because the event’s start or end time is after 12:00 AM UTC. So, even though it is displaying in EST, some of the data is incorrect because the feed itself is in UTC.

    Is there any way to fix this?

    Again, here is the iCal feed I am using: https://solutions.acstechnologies.com/crm/events/160997/main-calendar.ics/

    An example of an event that I am having an issue with is the OCC Packing Party Prep, which actually takes place on November 5th (from 1:00 PM – 8:00 PM EST or 5:00 PM – 12:00 AM UTC); this is showing up on November 6th (I assume because it ends at 12:00 AM when using UTC, which is not what we want).

    #1371318
    Andras
    Keymaster

    Hello again Katie,

    Yes, that can be an unfortunate consequence of the setup. (Really the best would be if the source feed could be adjusted.)

    Anywho, there is a setting, the ‘End of day cutoff’ that might help you with this. You can find it under Events > Settings >  General tab.

    Since UTC is 4 hours ahead, it might be good to set that to 4am.

    Let me know if that does the trick.

    Andras

    #1372160
    Katie Dahl
    Participant

    Gah, what a bummer- that didn’t work.

    I wish the feed could be adjusted; it is generated by some scheduling software, and the company that owns the software says they can’t change it.

    Any other ideas??

    #1372700
    Andras
    Keymaster

    Ah, sorry to hear that does not help.

    Please give me some time to check if there is something we can do.

    Andras

    #1374484
    Andras
    Keymaster

    Hello Katie,

    Thanks for your patience!

    A colleague was kind enough to take a look at this. We are making progress.

    He developed a snippet that will change the timezone and the timing of the events accordingly. You can find it here:

    https://gist.github.com/andrasguseo/c895e4a7755055c18148b5bbd482c1dd

    Copy the snippet at the end of your theme’s (preferably child theme’s) functions.php file. If there is already code there then you don’t need to copy the starting “<?php” tag.

    Please note, this code is still a work in progress. It works but I just discovered a glitch.

    Events which end on the next day in the UTC time (i.e. starts on Nov 2, ends on Nov 3) will be imported for the later day (so Nov 3). (One event like this would be ‘Volleyball’ which is supposed to be on November 2 based on the description.) We will check if we can do something about this and I’ll get back to you soon.

    Meanwhile you can test this code if you feel like and let me know how it works.

    Cheers,
    Andras

    #1381885
    Katie Dahl
    Participant

    Hey there– I apologize for the delay on my end; I had an unexpected family emergency and was away for a week.

    Okie-dokie, it looks like that code made a difference. Volleyball appears to be displayed at the right date and time? However, I noticed my past event “Sr. High Retreat” should be from the 3rd-5th, but is displaying as the 4th-6th.

    I don’t know if this is related or not, but I noticed that some of my events seem to be repeating weirdly– Sr. High retreat & on-going Christmas Setup seem to display several times.

    #1382955
    Andras
    Keymaster

    Hi Katie,

    Thanks for getting back to me. Hope everything is all right with the family.

    “Sr. High Retreat” should be from the 3rd-5th, but is displaying as the 4th-6th

    I believe this is the result of the glitch I was mentioning. We are not quite sure yet why this is happening.

    I noticed that some of my events seem to be repeating weirdly– Sr. High retreat & on-going Christmas Setup seem to display several times.

    Does it look like these are duplicates? Do these appear after an import has run?

    Andras

    #1383612
    Katie Dahl
    Participant

    I am not entirely sure if the repeated events are happening when there is an import run… Right now, there are 5 listings of that event for today (the 15th) all with slightly different dates. I will try to check again in the morning, and see if a new entry has been made.

    #1383613
    Katie Dahl
    Participant

    It appears that many of our events are duplicates, but Christmas Set-Up is the only one that has multiplied more than once. Other duplicates appear just twice; I don’t know why some events are duplicated, but not others.

    #1384348
    Andras
    Keymaster

    Hi Katie,

    The duplication can occur for several reasons.

    1. There might be a bug in out plugin.

    We would need to dig a bit further to see if this is the case. Starting point would be deleting all imported events, then removing them from the ‘Ignored’ list, and setting up a new import. Then monitor if the events are being duplicated with every import.

    2. The snippet that we provided does some changes to an event when it’s imported. When a next scheduled import is run it might see that the event details are different, so it imports the event again. This is also influenced by the setting under Events > Settings > Imports tab > Event Update authority.

    To test this the start would be the first step above while having the snippet deactivated. If it is confirmed that Step 1 works without issues, then re-enable the snippet and check if duplicates start afterwards.

    Probably the best would be if you could set up a staging site where we can test all this without effecting the live site. Would that be possible?

    Andras

    #1384400
    Katie Dahl
    Participant

    Hey Andras, this actually is a staging site– the live site is using My Event On, but I am hoping that we will switch all our clients over to The Events Calendar in the future (your product seems faster & is a lot more flexible when it comes to design). We are a marketing agency, and I am the one and only member of the web design department at the moment– we’ve got about 30 clients, and growing!

    So, we can do whatever we want with this site– it won’t affect their live site.

    Also, yesterday there were 5 instances of Christmas Set-Up, today there are 6– it has potentially added a new occurrence every day since I activated the snippet.

    #1385385
    Andras
    Keymaster

    Okay, so it looks like that with the snippet you get duplicates.

    You could do the following to confirm this:

    • Go to Events > Imports > Scheduled imports tab and run a manual import of the feed. Check if the events get duplicated. (If no, then we cannot use this method to confirm.)
    • If events are duplicated, then disable the snippet and run a manual import again. Check if there are new duplicates again.
      If this time there are no new duplicates, then it is the snippet that’s interfering.
      If there ARE duplicates, then we might have a bug with our plugin.

    I don’t know how much the source information is changed over time, and whether you need to reflect the changes made there. You can always try playing around with the Event Update Authority settings under Events > Settings > Import tab.

    Meanwhile I will also try to check the import and the duplication.

    Cheers,
    Andras

    #1387171
    Katie Dahl
    Participant

    Okay– I ran a manual import this morning, and the Christmas set-up event went from 9 occurrences to 10.

    I disabled the snipped, and ran another import– this time, a duplication was not created; it stayed at 10.

    I have not reactivated the snipped.

    #1388215
    Andras
    Keymaster

    Hello Katie,

    I did a test last week with scheduled import (without the snippet) and I got duplications every single time. Now I’m re-testing it. Did you by chance test it with scheduled runs?

    What you can definitely try – if it suits your needs – is to set the Event Update Authority under Events > Settings > Imports tab to “Do not re-import events. Changes made locally will be preserved.”

    If you need updates from the events coming from that feed, then obviously this setting will probably not be good for you.

    I’ll let you know how I end up with my test.

    Andras

    #1404641
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Event Dates Displaying Incorrectly’ is closed to new replies.