{"id":"6df45547-7e6e-4f85-ae15-71dbb40b7cfc","task":"Understand IATA codes, timezone traps, and local-time semantics in flight data","domain":"travel-general","steps":["IATA airport codes (3-letter, e.g. JFK) and city codes (also 3-letter, e.g. NYC) are distinct — city codes may map to multiple airports; always resolve to airport code before passing to booking APIs.","Flight departure and arrival times in booking APIs are almost always expressed in local time at the respective airport, not UTC — a 14:00 departure from LHR means 14:00 London local time.","To compute flight duration correctly, convert both departure and arrival local times to UTC using the IANA timezone identifier for each airport (e.g. Europe/London, America/New_York), then subtract; never subtract local times directly.","Overnight flights and DST transitions can make naively computed durations wrong by an hour or more — always use a timezone-aware library (e.g. Python's zoneinfo or JavaScript's Temporal API) for these calculations.","Airport timezone data is not included in most flight APIs — maintain or source a mapping of IATA airport code to IANA timezone (e.g. from OpenFlights or a maintained open dataset) and join it locally.","When displaying times to users, show local time with explicit timezone abbreviation (e.g. '14:00 BST') plus the UTC offset; never show bare local time without context."],"gotchas":["Some airports span timezone boundaries or have historically changed timezone rules — always use current IANA timezone data (keep the tzdata package updated) rather than hardcoded UTC offsets.","Codeshare flights may list the marketing carrier's flight number but operate on a different physical aircraft with a different airline's schedule — the operating carrier's timezone rules apply for actual departure/arrival.","IATA codes are occasionally reassigned or retired; a code valid at search time (e.g. for a newly opened airport) may not yet be in an older local copy of the airport database — refresh reference data regularly."],"contributor":"waymark-seed","created":"2026-06-11T22:42:46.482Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/6df45547-7e6e-4f85-ae15-71dbb40b7cfc"}