• I have this plugin set up on WordPress 4.9.4, with CiviCRM 4.7.31. I am using the shortcode on a page to display upcoming events. I noticed recently that on the day of an event, the event does not show in the list when there is less than 7 hours until the event start time. When I change the event start time in Civi to 7+ hours ahead of the current time, it shows up in the list. Events are showing up correctly on the CiviCRM calendar page, and I have verified that mySQL and PHP are using the system time, which is set to -07:00 UTC (America/Los Angeles).

    Somewhat unrelated, but for additional sanity checking, I installed CiviCRM Event List plugin and the list that this rather simple plugin produces displays events with no issue. I have poked through the civievent widget code and do not see anything obvious that would cause this issue.

    Wondering if others had observed this, or if there is something obvious I am missing or otherwise some parameter to offset the event list to accommodate this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andie Hunt

    (@agh1)

    Some others have noticed tricky things with the timezones here, and it reflects issues at the intersection of PHP time, a WordPress user’s timezone, and the server’s system time.

    For better or worse, the listing widget and shortcode this plugin provide do not specify the date or time: they take whatever CiviCRM says the upcoming events are. The relevant code is here, and the CiviCRM function it calls just looks for events that start or end after the current PHP time.

    (In contrast, it looks like the other plugin you tried keeps looking for any event that starts on or after midnight of the current day, so that may be why you’re seeing different behavior there.)

    I suspect there’s a problem between CiviCRM’s handling of time and your configuration, but I don’t know what. This kind of thing has appeared with some folks’ CiviCRM and WordPress for a while now, but I’m not sure exactly in which circumstances it appears. Could you share what your WordPress timezone setting is? That may help, too.

    We are seeing the same problem. This is affecting potential participants to our events like an online video conference where we are tying in conference meeting ID information into the RSVP confirmations. I have tried to extend the Registration End Date to be a day or two after the event date and have put in the ‘custom’ admin type parameters on the shortcode. Neither have worked.

    For reference here’s the shortcode that I had in the page to try the ‘custom’ admin type settings:

    [civievent_widget admin_type=”custom” custom_display='{“event_title_infolink”:{“title”:0,”prefix”:null,”suffix”:null,”wrapper”:1},”description”:{“title”:1,”prefix”:null,”suffix”:null,”wrapper”:1}}’ custom_filter='{“start_date”: {“>=”: “2018-08-01”}, “is_public”: 1, “options”: {“sort”: “start_date ASC”}}’]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Events stuck on UTC time?’ is closed to new replies.