Changed flights to datetime in isLegal().