• In the file .../wp-meetup/includes/shortcodes/event-list.php is uses the date() function to compare current date against meeting date, in order to decide if this is an ‘upcoming’ event.

    Problem is that date() will use UTC+0 since that is what WordPress sets the default PHP timezone to.

    Line 81 of that file should use the WP function current_time('U'):

    `// The user only wants future events shown
    if ($this->atts[‘show’] == ‘future’) {
    foreach ($this->core->events as $event) {
    if ($event->event_time >= current_time(‘U’)) {
    $use_events[] = $event;
    }
    }
    } `

    https://www.ads-software.com/plugins/wp-meetup/

  • The topic ‘Event list shortcode date timezone error’ is closed to new replies.