module IANA_Converter

Better IANA Timezone Mapping @author Justin Karnes <justin@perfectcube.co>

Constants

CA_TIMEZONE_MAPPING

The complete IANA CA Timezone list with mappings to Rails timezones

MASTER_MAP

A mapping to `nil` indicates that either: # I was unable to figure out which timezone's rules match the key timezone # Rails does not have a timezone whose rules match the key timezone.

US_TIMEZONE_MAPPING

The Complete IANA US Timezone list with mappings to Rails timezones.

Public Instance Methods

rails_timezone_for(iana_timezone) click to toggle source

Finds which Timezone string Rails uses to reference an IANA/OLSON timezone.

@param iana_timezone [String] the IANA/OLSON timezone you are trying to use, `'America/Boise'` as an example @return [String] the rails timezone that encapsulates the timezone you converted.

# File lib/iana_converter.rb, line 80
def rails_timezone_for(iana_timezone)
  MASTER_MAP[iana_timezone]
end