Recurring event dates not saving correctly in database

Home Forums Calendar Products Events Calendar PRO Recurring event dates not saving correctly in database

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #190545
    Karen Newman
    Participant

    I actually have two problems. The first is that the dates for recurring events are not saving correctly in the database for all day events. For example I have an event occurring everyday from May 25th until May 31st. If I look at my month view I will see the event listed twice on days, the first one is the previous days event, and the other is the current days. I looked in the post meta table and saw that it is saving the dates like this:

    5/26:
    EventStartDate: 2014-05-26 04:00:00
    EventEndDate: 2014-05-27 03:59:59

    5/27:
    EventStartDate: 2014-05-27 04:00:00
    EventEndDate: 2014-05-28 03:59:59

    This does not seem right, I would think it should be
    EventStartDate: 2014-05-26 00:00:00
    EventEndDate: 2014-05-26 23:59:59

    I did fix the dates in the database and it did fix the issue. Is there a setting I need to change to it knows my timezone or something?

    My second problem is when I go to the single events page to view the details of the event, it goes to a URL with the event name/event date, then redirects to the page for the event that created all the recurring events.

    I really need help with this ASAP, I’m launching this site on Monday. Thanks!

    #191377
    Barry
    Member

    Hi – sorry you’re experiencing difficulties.

    With regards to the offset first of all, is it possible your end of day cutoff is 4am (or might it have been 4am when the original event was created)? What basically happens at present is an all day event is taken to be a 24hr period and it “rotates” to accommodate the end of day cutoff setting.

    Does that explain/clarify that particular issue?

    #191450
    Karen Newman
    Participant

    Right, I understand that, and that is not the issue. I did some digging and found out that it was timezone related. In the tribeeventspro-recurrenceintance.php file, you guys are using the datetime php class. There, it was using the timezone type of 1 when I printed out the $this var. I realized that it was set that way in wordpress, changed it and it still didn’t work. Since I have to launch on Monday, I had to change the code to set the timezone in that files to be America/New_York so the times will save correctly. I would still like to figure this out with you guys thought. I would assume that your plugin is using the WordPress timezone setting, but it doesn’t seem to be working for me.

    I know you guys don’t like to jump around with issues in a thread, but I now need to figure out the second issue with the redirects happening with the recurring events.

    #191516
    Karen Newman
    Participant

    Sorry for all the posts! The redirect issue has seemed to resolve itself. I’ll be good for my Monday launch, but it would be nice to figure out the first issue with the recurring events. The cutoff time is set to 12am. When I set the timezone in the script mentioned above it will get the correct times. I’m not sure what is going on.

    #192644
    jourdand
    Participant

    I’m having the same issue. I have my main event and the date / time shows correct as 5/31 from 10 PM until Midnight. But if I turn it into a recurring event the first still shows fine but everything after pushes out 5 hours later (3 AM until 5 AM of Sunday).

    #198589
    Karen Newman
    Participant

    Sorry for the frantic posting on Friday. I was just trying to make sure that I had everything ready for my launch today. The issue with the single recurring event being redirected to the parent event seems to have fixed itself. I’m still concerned about the timezone issue.

    Based on what you asked Barry, no the cut off was not set at 4am. It is set at 12 am. Like I said before, I would think the plugin would use the timezone setting from WordPress, but it doesn’t seem like it does. I had to edit the code to include the timezone to get it to work correctly, which I didn’t want to do, since I don’t like editing plugins, but had to this time. I would like to get it back to the code you provide, and be able to set the timezone else where.

    Let me know if you need anymore info. Thanks!

    #199319
    Barry
    Member

    OK, I think I’ll need a little more detail here as I can’t seem to replicate this:

    • What is your WordPress timezone setting?
    • Are you finding an issue with newly created events or just those created previously?
    • Are you creating them initially as single events and then converting them to recurring events after initial publication, as in jourdand’s case?
    • Is this only a problem with all day events for you or do you find like jourdand it effects regular events, too?

    Sorry for all the questions – but I’d love to get a better handle on this. Thanks!

    #209533
    Karen Newman
    Participant

    This just keeps getting crazier! I applied my fix for the timezone, pushed the site live, and it was fine. Then more events were posted and they were messed up! I removed my fix and it was fine. Maybe I’m just going insane!! Sorry for all of this. I guess I don’t have a problem anymore!

    #209546
    Barry
    Member

    OK, so (at least for the time being) the problem is resolved?

    #209553
    Karen Newman
    Participant

    Yup. I am going to continue to monitor it.

    #209831
    Barry
    Member

    Okey dokey, well let’s keep this open for the time being and if you hit further issues along these lines we can take another look – otherwise I’ll close it after a couple of weeks have elapsed (if I don’t hear back from you, that is).

    Thanks!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Recurring event dates not saving correctly in database’ is closed to new replies.