Skip to content

ActiveSupport::TimeZone.all throws exception #33128

@kalinchuk

Description

@kalinchuk

Steps to reproduce

ActiveSupport::TimeZone.send(:zones_map).values does not include the Srednekolymsk time zone and instead returns nil for it. Because of that this happens:

ActiveSupport::TimeZone.all
ArgumentError: comparison of NilClass with ActiveSupport::TimeZone failed

Expected behavior

ActiveSupport::TimeZone.all should return a list of TZInfo::DateTimezone objects and not error out.

Actual behavior

An exception is thrown during the sort in the all method due to nil value.

System configuration

Rails version: Rails 5.2.0

Ruby version: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions