Skip to content

Handle missing time zone data better #106

@mattjohnsonpint

Description

@mattjohnsonpint

Currently, if you forget to load the time zone data, or you typo or make up a zone that doesn't exist, you get the local time.

moment().tz("Foo/Bar").format()

Instead, this should error with something like:

The zone "Foo/Bar" could not be found. Did you forget to load the time zone data file?

Or something like that.

This will improve the dev experience, as several questions get posted on StackOverflow where the only issue is that they didn't see or understand the instructions for loading the tz data.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions