FlightAware Discussions

Flight Status and Flight Duration

Dear Team,
If querying for specific flight number/date, Which function returns flight status i.e. Scheduled, Departed, Arrived, Delayed, Cancelled,…etc? And which one returns flight duration?


The “actual*” fields will be 0 if that event has not yet occurred, -1 if the flight has been cancelled, or another the timestamp of value if it has occurred.

Flight duration is just (actualarrivaltime - actualdeparturetime). You can look at the “filed_ete” to see how the duration compares with the planned duration.

And which field under which function is the planned duration?

Which field under which function is the planned duration? Also there is no filed_ArrivalTime, so what is the field of scheduled arrival time?

Everything you’ve been asking about is from FlightInfoEx.

As i mentioned in another of your questions, the flight duration is filed_ete.

Flight plans used by pilots do not specify a filed arrival time. However, you can calculate it by adding filed_ete to filed_departuretime.

Thanks for the all the info but I already thought of adding the duration to the filed departure time and I think there will be able issue because of the time difference, isn’t departure and arrival timing pulled in the local time of origin/destination? If yes, can you please recommend a solution?

All times returned by FlightInfoEx (and FlightXML in general) are UTC Unix epoch seconds, not local time. If you want local time you must convert them yourself from UTC using the airport timezone.

Thanks! Can you please provide the local time zone conversion formula?

You will want to use zoneinfo/tz_data functionality or library available within your language of choice. (You should not attempt to write your own timezone offset math, since the rules for Daylight Savings Time are complex and ever changing.) See en.wikipedia.org/wiki/Tz_database for details. You can call AirportInfo to get the tz_data identifier for an airport and use that to convert an epoch time to local time.