diff --git a/gp-limit-dates/gpld-push-min-date-to-next-day-after-set-time.php b/gp-limit-dates/gpld-push-min-date-to-next-day-after-set-time.php index a28f6e7b..0934f32e 100644 --- a/gp-limit-dates/gpld-push-min-date-to-next-day-after-set-time.php +++ b/gp-limit-dates/gpld-push-min-date-to-next-day-after-set-time.php @@ -13,7 +13,8 @@ $current_time = new DateTime( wp_timezone_string() ); $cutoff_time = ( new DateTime( wp_timezone_string() ) )->setTime( $cutoff_hour, 0 ); if ( $current_time > $cutoff_time ) { - $options['minDate'] = wp_date( 'm/d/Y', strtotime( 'midnight tomorrow', $current_time->getTimestamp() ) ); + $tomorrow = new DateTime( 'tomorrow midnight', $current_time->getTimezone() ); + $options['minDate'] = wp_date( 'm/d/Y', $tomorrow->getTimestamp() ); } return $options; } );