Skip to content

Commit

Permalink
Should not add timezone offset to event date processing.
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Sep 11, 2024
1 parent 68ba506 commit e22c958
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/includes/date-utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ function mc_exit_early( $event, $process_date ) {
* @return {bool}
*/
$hide_days = apply_filters( 'mc_hide_additional_days', $hide_days_default, $event );
$today = mc_date( 'Y-m-d', strtotime( $event->occur_begin ) );
$current = mc_date( 'Y-m-d', strtotime( $process_date ) );
$end = mc_date( 'Y-m-d', strtotime( $event->occur_end ) );
$today = mc_date( 'Y-m-d', strtotime( $event->occur_begin ), false );
$current = mc_date( 'Y-m-d', strtotime( $process_date ), false );
$end = mc_date( 'Y-m-d', strtotime( $event->occur_end ), false );
// if event ends at midnight today (e.g., very first thing of the day), exit without re-drawing.
// or if event started yesterday & has event_hide_end checked.
$ends_at_midnight = ( '00:00:00' === $event->event_endtime && $end === $process_date && $current !== $today ) ? true : false;
Expand Down

0 comments on commit e22c958

Please sign in to comment.