lib/models/trip_leg.rb in fossil-0.4.10 vs lib/models/trip_leg.rb in fossil-0.4.12
- old
+ new
@@ -732,14 +732,14 @@
def is_flown?
((verified? or flight_time_actual > 0) and cancel_code == 0)
end
- # flight explorer is continually updating the land time for a flight, so
-
+ # Flight explorer is continually updating the land time for a flight, so its really
+ # not possible to tell if a flight is completed by checking that the arrival date
+ # or time is no longer 0/1440.
def is_completed_leg?
-
- is_flown? and (land_time_act_gmt!=1440 and land_time_act_gmt!=0)
+ (verified? or Time.now.utc > actual_arrival_date_time_gmt) and cancel_code == 0
end
def departed?
dept_date_act_gmt!=0
end
\ No newline at end of file