Skip to content
  • Andrew White's avatar
    0222ebbe
    Return all mappings for a timezone id in `country_zones` · 0222ebbe
    Andrew White authored
    Some timezones like `Europe/London` have multiple mappings in
    `ActiveSupport::TimeZone::MAPPING` so return all of them instead
    of the first one found by using `Hash#value`. e.g:
    
      # Before
      ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh"]
    
      # After
      ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh", "London"]
    
    Fixes #31668.
    
    (cherry picked from commit 2d95956e)
    0222ebbe
    Return all mappings for a timezone id in `country_zones`
    Andrew White authored
    Some timezones like `Europe/London` have multiple mappings in
    `ActiveSupport::TimeZone::MAPPING` so return all of them instead
    of the first one found by using `Hash#value`. e.g:
    
      # Before
      ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh"]
    
      # After
      ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh", "London"]
    
    Fixes #31668.
    
    (cherry picked from commit 2d95956e)
Loading