Current SQL queary uses a BETWEEN statement to get the correct departure_epoch in the loop because the == does not get the desired results.