Files
dify/web/utils/timezone.ts
2026-05-15 11:02:48 +08:00

15 lines
299 B
TypeScript

import tz from './timezone.json'
type Item = {
value: number | string
name: string
}
export const timezones: Item[] = tz
export const getBrowserTimezone = () => {
if (typeof Intl === 'undefined')
return undefined
return Intl.DateTimeFormat().resolvedOptions().timeZone || undefined
}