Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rails 6.0 time zones as TZInfo identifiers
ActiveSupport::TimeZone.all.group_by(&:formatted_offset).each {|offset| puts "### UTC #{offset[0]}"; offset[1].each {|tz| puts "* #{tz.tzinfo.identifier}"}; puts "\n"};nil

UTC -11:00

  • Pacific/Pago_Pago
  • Pacific/Midway

UTC -10:00

  • Pacific/Honolulu

UTC -09:00

  • America/Juneau

UTC -08:00

  • America/Los_Angeles
  • America/Tijuana

UTC -07:00

  • America/Phoenix
  • America/Chihuahua
  • America/Mazatlan
  • America/Denver

UTC -06:00

  • America/Guatemala
  • America/Chicago
  • America/Mexico_City
  • America/Mexico_City
  • America/Monterrey
  • America/Regina

UTC -05:00

  • America/Bogota
  • America/New_York
  • America/Indiana/Indianapolis
  • America/Lima
  • America/Lima

UTC -04:00

  • America/Halifax
  • America/Caracas
  • America/Guyana
  • America/La_Paz
  • America/Puerto_Rico
  • America/Santiago

UTC -03:30

  • America/St_Johns

UTC -03:00

  • America/Sao_Paulo
  • America/Argentina/Buenos_Aires
  • America/Godthab
  • America/Montevideo

UTC -02:00

  • Atlantic/South_Georgia

UTC -01:00

  • Atlantic/Azores
  • Atlantic/Cape_Verde

UTC +00:00

  • Africa/Casablanca
  • Europe/Dublin
  • Europe/London
  • Europe/Lisbon
  • Europe/London
  • Africa/Monrovia
  • Etc/UTC

UTC +01:00

  • Europe/Amsterdam
  • Europe/Belgrade
  • Europe/Berlin
  • Europe/Zurich
  • Europe/Bratislava
  • Europe/Brussels
  • Europe/Budapest
  • Europe/Copenhagen
  • Europe/Ljubljana
  • Europe/Madrid
  • Europe/Paris
  • Europe/Prague
  • Europe/Rome
  • Europe/Sarajevo
  • Europe/Skopje
  • Europe/Stockholm
  • Europe/Vienna
  • Europe/Warsaw
  • Africa/Algiers
  • Europe/Zagreb
  • Europe/Zurich

UTC +02:00

  • Europe/Athens
  • Europe/Bucharest
  • Africa/Cairo
  • Africa/Harare
  • Europe/Helsinki
  • Asia/Jerusalem
  • Europe/Kaliningrad
  • Europe/Kiev
  • Africa/Johannesburg
  • Europe/Riga
  • Europe/Sofia
  • Europe/Tallinn
  • Europe/Vilnius

UTC +03:00

  • Asia/Baghdad
  • Europe/Istanbul
  • Asia/Kuwait
  • Europe/Minsk
  • Europe/Moscow
  • Africa/Nairobi
  • Asia/Riyadh
  • Europe/Moscow

UTC +03:30

  • Asia/Tehran

UTC +04:00

  • Asia/Muscat
  • Asia/Baku
  • Asia/Muscat
  • Europe/Samara
  • Asia/Tbilisi
  • Europe/Volgograd
  • Asia/Yerevan

UTC +04:30

  • Asia/Kabul

UTC +05:00

  • Asia/Yekaterinburg
  • Asia/Karachi
  • Asia/Karachi
  • Asia/Tashkent

UTC +05:30

  • Asia/Kolkata
  • Asia/Kolkata
  • Asia/Kolkata
  • Asia/Kolkata
  • Asia/Colombo

UTC +05:45

  • Asia/Kathmandu

UTC +06:00

  • Asia/Almaty
  • Asia/Dhaka
  • Asia/Dhaka
  • Asia/Urumqi

UTC +06:30

  • Asia/Rangoon

UTC +07:00

  • Asia/Bangkok
  • Asia/Bangkok
  • Asia/Jakarta
  • Asia/Krasnoyarsk
  • Asia/Novosibirsk

UTC +08:00

  • Asia/Shanghai
  • Asia/Chongqing
  • Asia/Hong_Kong
  • Asia/Irkutsk
  • Asia/Kuala_Lumpur
  • Australia/Perth
  • Asia/Singapore
  • Asia/Taipei
  • Asia/Ulaanbaatar

UTC +09:00

  • Asia/Tokyo
  • Asia/Tokyo
  • Asia/Seoul
  • Asia/Tokyo
  • Asia/Yakutsk

UTC +09:30

  • Australia/Adelaide
  • Australia/Darwin

UTC +10:00

  • Australia/Brisbane
  • Australia/Melbourne
  • Pacific/Guam
  • Australia/Hobart
  • Australia/Melbourne
  • Pacific/Port_Moresby
  • Australia/Sydney
  • Asia/Vladivostok

UTC +11:00

  • Asia/Magadan
  • Pacific/Noumea
  • Pacific/Guadalcanal
  • Asia/Srednekolymsk

UTC +12:00

  • Pacific/Auckland
  • Pacific/Fiji
  • Asia/Kamchatka
  • Pacific/Majuro
  • Pacific/Auckland

UTC +12:45

  • Pacific/Chatham

UTC +13:00

  • Pacific/Tongatapu
  • Pacific/Apia
  • Pacific/Fakaofo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment