Event Shouldn't Be Showing in Past Events Yet

Home Forums Calendar Products Events Calendar PRO Event Shouldn't Be Showing in Past Events Yet

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1193850
    RANDY
    Participant

    Hi there,

    I noticed that an event happening today is currently being archived under “Past Events”. However, this shouldn’t be the case since it is currently ongoing.

    Is there a way to change this?

    #1194199
    RANDY
    Participant

    Okay, I got something going now.

    $events = tribe_get_events( array(
    'posts_per_page' => 2,
    'order'		 => DESC,
    'end_date'       => date( 'Y-m-d 00:00:00' ),
    'eventDisplay'	 => 'custom'
    ) );

    The issue is that this ALMOST works. I still need to get it the last hour, minute, and second as well if I can.

    #1194263
    Nico
    Member

    Hi there Randy,

    Thanks for getting in touch with us! I can help you here but I don’t think I fully understand the issue so let’s begin by clarifying this a bit:

    I noticed that an event happening today is currently being archived under “Past Events”. However, this shouldn’t be the case since it is currently ongoing.

    Is this happening in a calendar view or in an events query like the one you show in the next reply?

    Regarding the code you shared, the date format is not correct. Try the following:

    $events = tribe_get_events( array(
    'posts_per_page' => 2,
    'order' => DESC,
    'end_date' => date( 'Y-m-d H:i:s' ),
    'eventDisplay' => 'custom'
    ) );

    Please let me know about it,
    Best,
    Nico

    #1194471
    RANDY
    Participant

    Nico,

    It’s happening in both.

    For example, we have an event today (11/18/16) and it runs from 8AM to 5PM.

    It is 2:30PM right now but the event is showing in both Past Events and Upcoming Events. This should not be the case since the event is technically still ongoing and should stay in Upcoming until it reaches the end time.

    The ended code has put the ongoing event back in Past Events again. It looks like I might have to mess with the time to achieve what we want in this case.

    #1194572
    RANDY
    Participant

    “The ended code has put the ongoing event back in Past Events again. It looks like I might have to mess with the time to achieve what we want in this case.”

    Oops what I meant to say was:

    The new code has put the ongoing event back in Past Events again.

    #1195512
    Nico
    Member

    Thanks for following up Randy!

    Glad to hear the code worked! Basically the code you were using was not taking time in account.

    Regarding the times not being the correct ones, Can you please check the site timezone (WP-Admin > Settings > General > Timezone)? And also Events timezone settings in WP-Admin > Events > Settings > General? That might be the cause of the offset you are seeing.

    Please let me know about it,
    Best,
    Nico

    #1195523
    RANDY
    Participant

    Nico,

    The code is not working as expected yet.

    For the setting under events, it is currently set to:

    Timezone mode: Use the local timezones for each event
    Show timezone: Unchecked

    Time zone for general WordPress is correctly set for Los Angeles.

    #1196168
    Nico
    Member

    Thanks Randy!

    Timezone mode: Use the local timezones for each event

    This mean the configured Timezone in each event will be used. Can you check what’s the timezone for events you noticed failed?

    Also, is there an off set you noticed? For example: events are getting to past event one hour earlier or later than expected?

    Thanks,
    Nico

    #1205915
    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 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Event Shouldn't Be Showing in Past Events Yet’ is closed to new replies.