3
votes

Innovata publish the IATA Time Zone/Daylight Saving Time data for airline industry.
These files contains airport code, IATA Time Zone, start/stop date for UTC offset, UTC offset and longitude/latitude for the airport.

What is the best practice to convert an IATA Time Zone into Olson Db/Tz Database format or DateTimeZone for use with Joda Time?

2
Do you have any more information about the format of these files?Jon Skeet
@Jon Skeet: I think it is possible to get sample files from Innovata. They are text files with offset from UTC, IATA Timezone code (country code + number/letter), latitude/longitude. (mail [email protected])Kb.
But presumably with dates for changes as well... can you use DateTimeZoneBuilder easily? (Were you aware of that before?)Jon Skeet
Yes date and time for changes.Kb.
What do you need to do with the DateTimeZone after you have it? In particular, do you need to just use if for computation, or do you need to output a name for it too? Also, the input includes "start/stop date for UTC offset" - does this mean multiple records for a given airport, one for each DST/ST year-part in the schedule?Ed Staub

2 Answers

1
votes

Already added in a comment, but...

I suspect it would be easiest to just parse the file and create DateTimeZone instances via DateTimeZoneBuilder. You could also potentially implement ZoneInfoProvider if you didn't want to pass the zones around.

1
votes

Have you considered converting the UTC offset to DateTimeZone instead?