convert epoch time from EDT to airport timezone


#1

I wonder if there’s any way to get the time zone of an airport according to the return epoch date.
For example, I wish to know the departure time and arrival time of delta flight as given in the picture below.

using the API I get the following result:

{“AirlineFlightSchedulesResult”:{“next_offset”:-1,“data”:{“ident”:“DAL8728”,“actual_ident”:“AFR76”,“departuretime”:1414084200,“arrivaltime”:1414125600,“origin”:“LFPG”,“destination”:“KLAX”,“aircrafttype”:“B772”,“meal_service”:“First: Dinner / Business: Dinner / Economy: Dinner”,“seats_cabin_first”:4,“seats_cabin_business”:49,“seats_cabin_coach”:194}]}}

converting the epoch time I get:

1414084200 = Thu Oct 23 13:10:00 EDT 2014
1414125600 = Fri Oct 24 00:40:00 EDT 2014

My question:

  1. The epoch result are in EDT, how to ‘convert’ them to the airport time zone time (I wish to have the result exactly like in the photo below). I checked the AirportInfo but it just return result such as “timezone”:":Europe/Paris" (no good)
  2. the timezone in LAX may be -7 or -8 (winter or summer) so how can I make sure the conversion factor the daylight issue.

thanks!


#2

The timezones returned by AirportInfo are actually exactly what you want. “:Europe/Paris” is something you can directly use to convert the epoch times into local times (You may need to strip the leading colon though). For more background about that format of timezone identifier, see en.wikipedia.org/wiki/Tz_database