DST and GMT of airports


I am subscribing to the API web services, but I have a question.

I would like to know if there is a method where I can find the GMT of the airports, and also the DST start and end date?
Is there something available?


When you say the GMT of the airport, do you mean the offset from GMT for the airport’s local timezone?

By DST do you mean daylight savings time, and if so what timezone are you wondering about?


YES, like Sao Paolo is officially GMT -3.

Yes, I need to know that in GRU, on 15 of October, there will be DST, and GMT will be -2.

How can I previously know that an airport will enter on DST?


If you’re using FlightXML3, the AirportInfo method returns the timezone of the airport. You can then use the timezone to figure out offset and DST settings. How you do that is going to vary by language, here’s an example of how to get that information using Java (pretty much every modern language has a way of determining DST transitions for a timezone):

    String timezone = "America/Chicago";
    ZoneId zoneId = ZoneId.of(timezone);
    ZoneRules rules = zoneId.getRules();

    // Show the current offset
    ZoneOffset currentOffsetForZone = rules.getOffset(Instant.now());
    System.out.println(String.format("%s current offset: %d hr", timezone, currentOffsetForZone.getTotalSeconds() / 60 / 60));

    // Show the next DST transitions
    ZoneOffsetTransition nextTransition = rules.nextTransition(Instant.now());
    System.out.println(String.format("Next DST transition: %s", nextTransition.getInstant().atZone(zoneId)));

    // Transition after that
    ZoneOffsetTransition nextNextTransition = rules.nextTransition(nextTransition.getInstant());
    System.out.println(String.format("Next DST transition: %s", nextNextTransition.getInstant().atZone(zoneId)));