Ok, weird one.
Wrote a script to check XML feed if school is closed for my kids county. Each entry comes with an "effective date" node, which is the date the school closing announcement is effective.
What I was doing, was comparing if the effective date, is older than the current time, which means that after midnight, a closing on the current day would work. But what if they close school the evening/night beforehand?
I need to check if the effective date is greater than today, but starting at 4pm instead of midnight.
date_default_timezone_set('America/New_York');
$date_effective = $announcement->date_effective;
// format of xml feed datetime - 2018-02-02 00:00:00.000000
$date = new DateTime($date_effective);
$now = new DateTime();
// Here is where I need help, not sure how to word this
// if($date < $now || $date < $now - '8 hours') {
if($date < $now) {
// iterate through cases based on status
}