Created
March 22, 2017 16:16
-
-
Save mcmire/9386030451bd8d1928696a222e5b4585 to your computer and use it in GitHub Desktop.
Time zone identifiers in Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1] pry(main)> ActiveSupport::TimeZone.us_zones.map { |zone| puts "#{zone.name.inspect} => #{zone.tzinfo.name.inspect} (#{zone.utc_offset / 3600} from UTC)" }; nil | |
"Hawaii" => "Pacific/Honolulu" (-10 from UTC) | |
"Alaska" => "America/Juneau" (-9 from UTC) | |
"Pacific Time (US & Canada)" => "America/Los_Angeles" (-8 from UTC) | |
"Arizona" => "America/Phoenix" (-7 from UTC) | |
"Mountain Time (US & Canada)" => "America/Denver" (-7 from UTC) | |
"Central Time (US & Canada)" => "America/Chicago" (-6 from UTC) | |
"Eastern Time (US & Canada)" => "America/New_York" (-5 from UTC) | |
"Indiana (East)" => "America/Indiana/Indianapolis" (-5 from UTC) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment