1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Files
tooot/src/utils/startup/timezone.ts
xmflsct 9e0e8db82a Fix Android start up crash
Maybe then we can run it in BrowserStack
2023-01-08 12:21:38 +01:00

15 lines
406 B
TypeScript

import * as Localization from 'expo-localization'
import log from './log'
const timezone = () => {
log('log', 'Timezone', Localization.getCalendars()[0].timeZone || 'unknown')
if ('__setDefaultTimeZone' in Intl.DateTimeFormat) {
try {
// @ts-ignore
Intl.DateTimeFormat.__setDefaultTimeZone(Intl.DateTimeFormat.__setDefaultTimeZone('xxx'))
} catch {}
}
}
export default timezone