Help Desk

List showing expired events

  • Posts: 7 Topics: 2
    | Permalink

    We are using tribe_get_events to get the list of events coming up in the next week; start_date is the current date and end_date is 7 days in the future.

    However it looks like it is using the event’s _EventEndDateUTC to check if the event has passed. If an event ends at 23:59 in the local timezone, it will still appear on the query until the time on _EventEndDateUTC is passed. The timezone settings are using the option “Use the local timezones for each event”.

    Posts: 1466
    | Permalink

    Hi Troy,

    Thanks so much for reaching out!

    As a first troubleshooting step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?

    https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    In the meantime, I would also recommend checking your timezone settings under Settings < General.

    Let me know how it goes!

     

    Thanks,

    Jaime

    Posts: 7 Topics: 2
    | Permalink
    This reply has been marked as private.
    Posts: 7 Topics: 2
    | Permalink

    Hi Jamie,

    I have just checked the Timezone setting in the General Settings and it is set to the correct city.

    Thanks!

    Posts: 1466
    | Permalink

    Hi Troy,

    Thanks for providing me with that information.  You can also enable timezone support and additional timezone options for events by going to Events Settings < General and scrolling down to Timezone Settings.

    Additionally, I would recommend updating your WordPress version to the most recent version, and updating your Events Calendar plugin to the most recent version.

    Let me know how it goes!

     

    Thanks,

    Jaime

    Posts: 7 Topics: 2
    | Permalink

    Hi Jamie,

    In the Events general settings, timezone mode is: Use the local timezones for each event.

    The timezone works properly if visiting an individual event page, it will say the event has passed. But it will still appear in the tribe_get_events query. We have access with the database and I have been able to remove an event from the query by editing the _EventEndDateUTC meta key so the value matches the timezone.

    Posts: 1466
    | Permalink

    Hi Troy,

    So just to clarify, are you able to make things work by this method manually?  Or are you still experiencing the issue?  Your server timezone is set to UTC, so you may want to check with your server to see if you can adjust that timezone.

    Have you been able to update your plugins?

    In addition, there are a number of mixed content error messages appearing in the console, so I would recommend installing and configuring a plugin, like this one, in order to resolve those errors.

    It also seems that you do not have any Google Map API Keys, you can learn more about that configuration here:

    https://theeventscalendar.com/knowledgebase/setting-up-your-google-maps-api-key/

    Let me know how it all goes!

     

    Thanks,

    Jaime

    Posts: 7 Topics: 2
    | Permalink

    Hi Jamie,

    The regular Events Calendar and Pro version have been updated to the latest version and we are still able to replicate the issue. We’ve contacted our web host and we will not able to change the server timezone.

    Manually changing the _EventStartDateUTC no longer works to remove the event, only changing the end date of the event will remove it from the list.

    Example of my issue just to clarify what we’re seeing:
    – An event is set to end at 12:00 PST (-8) with the server timezone at UTC (0)
    – With this setting, the event will stay on our list of weekly events until 20:00 PST
    – If I change the event’s end date to be 04:00 PST, the single event page will say the event passed but it will appear on our weekly events page until the proper end time.

    Posts: 1466
    | Permalink

    Hi Troy,

    Happy New Year!

    Thank you for providing me with this information.  Just so you know, if you make changes to your timezone settings, you may need to manually change the events created before changes were made in order for those events to work properly.  If you create a new event under these conditions, do you still see the same issue occurring?

    Do you only see this issue occur when you use a shortcode, or on the main calendar as well?  If the issue occurs with a shortcode, can you provide me with that exact shortcode, so that I can run some tests on my end?

    Also, can you take a screenshot of how this event is set up in your Edit Event page, so that I can try to replicate the issue myself?

    Please let me know if you have any other questions in the meantime!

     

    Thanks,

    Jaime

    Posts: 7 Topics: 2
    | Permalink

    Hi Jamie,

    Happy New Year to you too!

    It seems like the issue is still present after creating a new event; the event still appears in the list. I have added a screenshot, the event was only set with a title, a small line of content, and Start/End dates.

    We are using the REST API to retrieve these events:

    tribe_get_events( array( ‘post_type’ => ‘tribe_events’, ‘eventDisplay’ => ‘upcoming’, ‘start_date’ => date( ‘Y-m-d H:i:s’ ), ‘end_date’ => date( ‘Y-m-d H:i:s’,strtotime(“+7 days”) )
    )
    );

    Posts: 1466
    | Permalink

    Hi Troy,

    I’m sorry that you are still experiencing this timezone issue when using the REST API to retrieve your events.

    Can you please enable WP_DEBUG and WP_DEBUG_LOG and share any debug messages you see?

    Would you mind also providing me with an updated system information in a private reply using the instructions found in the following link?

    https://theeventscalendar.com/knowledgebase/sharing-sys-info/

     

    Thanks,

    Jaime

You must be logged in and hold an active support license to create new topics in the help desk. Please visit our products store to purchase a license.

Subscribe to Updates