react-timezone-select
react-timezone-select copied to clipboard
Missing tz's from timezone-soft not handled gracefully
Describe the bug
I'm try to pass the full list of timezones available in the browser in as a custom timezone list, many work, but a handful don't, and those crash trying to access the empty output from calling timezone-soft
The list of missing timezones can be found in the ticket I logged with them: https://github.com/spencermountain/timezone-soft/issues/17
Some fail accessing the .daylight prop and others .standard
It would be great if this were to be fixed so that you can just pass the full list in and it will work, even if not perfectly.
Thanks very much for your time,
Adam
this is how I generate the list for your testing purposes:
const timezones = Intl.supportedValuesOf("timeZone");
const tzObj = timezones.reduce((a, v) => ({ ...a, [v]: v }), {});
Reproduction
pass in an object of timezone keys and values from the browser timezone list
System Info
System:
OS: macOS 12.5
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 43.10 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.7.0 - ~/.nvm/versions/node/v18.7.0/bin/node
Yarn: 1.22.19 - ~/Projects/stateful/app/node_modules/.bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v18.7.0/bin/npm
Browsers:
Brave Browser: 89.1.22.67
Chrome: 103.0.5060.134
Firefox: 101.0
Safari: 15.6
Used Package Manager
yarn
Validations
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a minimal reproducible of the bug.