()
| 31 | * falls back to a curated common set on runtimes without `Intl.supportedValuesOf`. |
| 32 | */ |
| 33 | export function getSupportedTimezones(): string[] { |
| 34 | const zones = |
| 35 | typeof Intl.supportedValuesOf === 'function' |
| 36 | ? Intl.supportedValuesOf('timeZone') |
| 37 | : COMMON_TIMEZONES |
| 38 | return zones.includes('UTC') ? zones : ['UTC', ...zones] |
| 39 | } |
| 40 | |
| 41 | /** A timezone choice for a picker: the canonical IANA value plus a display label. */ |
| 42 | export interface TimezoneOption { |
no outgoing calls
no test coverage detected