Skip to content

Commit

Permalink
Merge pull request #18 from gabebw/gbw-include-olson-tz-database-format
Browse files Browse the repository at this point in the history
Include the Olson timezone name in the data
  • Loading branch information
Tim Rogers authored Jun 26, 2019
2 parents 5b945c5 + 3c057b7 commit ef12116
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ task :update do
altitude: row[8],
timezone: row[9],
dst: row[10],
tz_name: row[11],
}
end

Expand All @@ -41,6 +42,7 @@ task :update do
altitude: nil,
timezone: "N",
dst: "5.5",
tz_name: "Asia/Calcutta"
}

cleaned_data = cleaned_data.reject { |code, _| code.nil? || code == "" }
Expand Down
2 changes: 1 addition & 1 deletion data/airports.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions lib/airports/airport.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module Airports
class Airport
attr_reader :name, :city, :country, :iata, :icao, :latitude, :longitude,
:altitude, :timezone, :dst
:altitude, :timezone, :dst, :tz_name

def initialize(name:, city:, country:, iata:, icao:, latitude:, longitude:,
altitude:, timezone:, dst:)
altitude:, timezone:, dst:, tz_name:)
@name = name
@city = city
@country = country
Expand All @@ -15,6 +15,7 @@ def initialize(name:, city:, country:, iata:, icao:, latitude:, longitude:,
@altitude = altitude
@timezone = timezone
@dst = dst
@tz_name = tz_name
end
end
end

0 comments on commit ef12116

Please sign in to comment.