mirror of
https://github.com/langgenius/dify.git
synced 2026-05-15 22:00:13 -04:00
15 lines
299 B
TypeScript
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
|
|
}
|