Support » Plugin: Events Manager » [events list scope=”future”] showing results before current time

  • Dear Sir,

    When I use [events_list scope=”future”] the first event that is displayed is something that is in the past. So, for example, it’s 11.45pm right now (9th November -EST) but according the events_list results (scope=”future”) the next event is at 12.15 pm – 45 pm today (9th) which was around midday today and has already been and gone. I would expect as soon as the current server time passes 12.45 pm (i.e. 12.46 pm) this event would not show up anymore as a future event but it still does.

    Any ideas why this might be happening? I’ve checked the time zone within the wordpress installation and it’s set to the time zone I’m in.

    Any other ideas? Any helped appreciated,

    Best wishes,

    Christopher Skelton.

    • This topic was modified 1 month, 1 week ago by  kelsangchodor.
Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    under WP Settings can you try to change your timezone settings to Manual Offset instead of per city?

    Hi Angelo,

    I did this (UTC-5) but it still does the same thing.

    So, it’s 1.40 pm now – but it’s still displaying the next event as 12.15pm

    Here’s the short code I’m using:

    [events_list limit=”1″ scope=”future” category=”42,38,41,40,39,44,46,48,45,43,49,50, 47″]#_{l jS M}, #g:#i #a</br>”#_EVENTNAME”
    Find Out More >>[/events_list]

    If it helps you to identify what might be wrong – yesterday the “future” event was showing starting at 12.15pm right up to 11.59pm on the same day. As soon the the clock ticked over mid-night into the next day it stopped showing it – and then showed the event on the next day (which was actually then in the future). It seems that scope “future” is showing events the start on the current day (even when time has passed) and that they remain there until the day ends.

    Thanks so much for any help,

    Best wishes,

    Christopher.

    kelsangchodor

    (@kelsangchodor)

    Dear Sir,

    Please can anyone help give me advice for the above problem?

    Best wishes,

    Christopher Skelton.

    Plugin Support caimin_nwl

    (@caimin_nwl)

    Do you have “Are current events past events?” set to Yes under Events > Settings > Pages > Event List/Archives?

    kelsangchodor

    (@kelsangchodor)

    Thanks for your reply.

    If I have an event from 14th November to 21st November and the current date was 16th November I would still want the event to be displayed so I wouldn’t want it to be a past event as in the option you suggest.

    I would like the event to be in the result lists until the current date is greater than the end date AND end time.

    So I don’t think the option above would work?

    The problem I have is every day we have a lunch event from 12.15 to 12.45pm. When I use scope=”future” the event is displayed even when the time has passed 12.45 pm. It stays that way until the time is midnight.

    What I would like is for all our events to be listed in the event list results until the end date AND end time are reached. Should scope=”future” do this or would I need to create my own scope?

    Thank you so much for your time. Its super appreciated. Sorry if I am confused. Just learning the ropes ☺

    Christohper Skelton.

    Plugin Support caimin_nwl

    (@caimin_nwl)

    Although to the minute cut-offs aren’t enabled by default, adding the code below to the functions.php file of your theme will add a new scope, future-mod, that should do what you want.

    https://pastebin.com/bgednURB

    kelsangchodor

    (@kelsangchodor)

    Wow! That’s perfect. Thanks so much for your time.

    I know you guys are super busy but I (we) super appreciate your help making it possible to do awesome things with the plugin,

    Have a good day,

    Chris Skelton.

    Plugin Support caimin_nwl

    (@caimin_nwl)

    No problem, glad to have helped 🙂

    If you have a moment, we’d appreciate if you could give us a quick review here:

    https://wordpress.org/support/plugin/events-manager/reviews/?rating=5#new-post

    Thanks!

    kelsangchodor

    (@kelsangchodor)

    Hi,

    Just to say I don’t think this code is correct. Has it been tested.

    The condition in the code is:

    $conditions[‘scope’] = ” (event_end_date >= CAST(‘$start_date’ AS DATE) AND event_start_time > CAST(‘$start_time’ AS TIME) AND event_end_date != ‘0000-00-00’ AND event_end_date IS NOT NULL) “;

    So, if the date & time of the event is, for example, 18th NOVEMBER 5.00 PM
    and Current Time 11th November 7PM – We would want the event to show (as it is in the future).

    The code above would meet the first condition “event_end_date >= CAST(‘$start_date’ AS DATE)” but it wouldn’t meet the second condition “event_start_time > CAST(‘$start_time’ AS TIME)” because the start time 5.00 pm is LESS THAN current time (and the second condition requires it to be LATER THAN). So, it would not show this event – and yet it is still in the future.

    Am I making any sense?

    Best wishes,

    Christopher Skelton.

    Still need just a little bit more help with this above! Can anyone help?

    Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry but I’m afraid that we are quite limited with regards to custom coding as per the support policy – http://eventsmanagerpro.com/support-policy/ but let’s check if we can give you additional advice with regards to custom coding.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    You’re right, that code is not right. I would suggest waiting a few days for this, rather than trying to make a workaround here.

    The reason for this is because we’re implementing Timezone support right now (it’s nearly ready) and with that we’ll be searching a newly added field, event_start and event_end which is a UTC DATETIME mysql value, meaning you can search for all events that are happening later than NOW, wherever in the world they may be relative to your blog Timezone (so, an event in Autstralia at 10am will have passed if your blog is 9am in Europe).

    We’re going to release the timezone feature as a dev version in the coming days, so you can test it out and let us know how it goes!

    Hi Marcus,

    Happy to test anything – I love that it will have TIMEZONE support too!

    Awesome – I will look out for the updates – thanks so much for this,

    How do I install a development version?

    Best Wishes,

    Chris Skelton.

    Plugin Support caimin_nwl

    (@caimin_nwl)

    Dev versions can be installed like this:
    http://wp-events-plugin.com/documentation/upgrade-dev-version/

    kelsangchodor

    (@kelsangchodor)

    From above:

    “The reason for this is because we’re implementing Timezone support right now (it’s nearly ready) and with that we’ll be searching a newly added field, event_start and event_end which is a UTC DATETIME mysql value, meaning you can search for all events that are happening later than NOW, wherever in the world they may be relative to your blog Timezone (so, an event in Autstralia at 10am will have passed if your blog is 9am in Europe).”

    Has has this update been released tonight?

    Thanks for your help,

    Christopher Skelton.

Viewing 15 replies - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.