MCPcopy Index your code
hub / github.com/RocketChat/Rocket.Chat / getTimezoneNames

Function getTimezoneNames

packages/tools/src/timezone.ts:32–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30};
31
32export const getTimezoneNames = (): string[] => {
33 const intl = Intl as typeof Intl & { supportedValuesOf?(key: 'timeZone'): string[] };
34 const zones = typeof intl.supportedValuesOf === 'function' ? intl.supportedValuesOf('timeZone') : [];
35 return zones.map((name) => LEGACY_TO_CANONICAL[name] ?? name).sort();
36};
37
38export const guessTimezoneFromOffset = (offset: string | number): string => {
39 const hours = Number(offset);

Callers 2

timezone.spec.tsFile · 0.90
useTimezoneNameListFunction · 0.90

Calls 2

sortMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected