FlightAware Discussions

Date Format Errors

I’m having an issue where the date format delivered by FlightInfoStatus (filed_departure_time – date) sometimes shows up in MM/DD/YYYY format instead of the usual DD/MM/YYYY format.

The wrong format seems to linger on the API for a few hours and is fixed when I request the data the next time (for example data received on 2 Dec @ 22:57:20 GMT had a 30th month of the year for idents BAW143, BAW293, BAW588, BAW631, BAW64, BAW727, BAW986).

Is this a known issue or am I alone in this?

You should not be attempting to programmatically parse the textual date field, and should instead be relying on the epoch or localtime fields if you need to further manipulate the timestamp. The date field is subject to localization settings, which is known to be bugged and rarely fallback to an unexpected locale.