Skip to content

Consider introducing a separate RegionTimeZone class #326

Open
@dkhalanskyjb

Description

@dkhalanskyjb

Right now, we have an all-encompassing class TimeZone and its subclass, FixedOffsetTimeZone: TimeZone.

TimeZone can be an interface instead, with two separate implementations: FixedOffsetTimeZone and RegionTimeZone. We could split the time zones by what identifier they have:

  • IANA tzdb identifiers, like Etc/UTC or Europe/Berlin,
  • and generic identifiers like GMT+01:30.

An upside is that a RegionTimeZone would always have a valid IANA timezone database identifier, guaranteed to be recognized everywhere: see #222. A downside is that Etc/UTC is also semantically a fixed-offset time zone, but wouldn't be marked as such. Also, something like Etc/UTC is not even a region, so maybe another name is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis could break existing codetimezoneThe model and API of timezones

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions