php - strtotime foreach issue -
i have this foreach statement here, runs query , outputs info table. query gets set of departures closest current time, after current time.
with strtotime, wanted subtract hours want show results before current time.
example
without strtotime -> results on , after 18:00 strtotime('-1 hour') -> results on , after 17:00
that's fine, , that's how strtotime should work. however, have custom statuses can see in pastebin, if($minutes2['0'] <= date('g'))
, on. basically, picks wrong status departures before current time, , displays either "final call" or "scheduled departure" instead of "landed".
to clarify, should "landed" because we're in past. time illustration 18:00, while in reality on schedule departed @ 17:10, status column shows "on time" or "on approach".
very puzzling , i'm wondering whether there's different way records instead of displaying them >= current time
?
php
No comments:
Post a Comment