I am trying to make a PHP function that returns the UTC timezone for a given airport code (IATA/FAA).
What the function should do is something like this:
echo getTimezoneFromAirportCode("CPH"); // +1
echo getTimezoneFromAirportCode("CXI"); // +14
To make this function I need a list of all aiport codes and their timezones.
By searching a bit I found this list: https://sourceforge.net/p/openflights/code/HEAD/tree/openflights/data/airports.dat?format=raw (Source: http://openflights.org/data.html)
After looking up a couple of airport codes in the list I found out that some of the data was incorrect. For instance it lists CXI
to be in the UTC -12
timezone - which according to this page is incorrect.
Does any of you know a public list that provides the data needed to make the getTimezoneFromAirportCode
function?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…