mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fix #655
This commit is contained in:
@ -10,7 +10,6 @@ import log from '@utils/startup/log'
|
||||
import netInfo from '@utils/startup/netInfo'
|
||||
import push from '@utils/startup/push'
|
||||
import sentry from '@utils/startup/sentry'
|
||||
import timezone from '@utils/startup/timezone'
|
||||
import { storage } from '@utils/storage'
|
||||
import {
|
||||
getGlobalStorage,
|
||||
@ -39,7 +38,6 @@ dev()
|
||||
sentry()
|
||||
audio()
|
||||
push()
|
||||
timezone()
|
||||
enableFreeze(true)
|
||||
|
||||
log('log', 'App', 'delay splash')
|
||||
|
@ -1,3 +1,4 @@
|
||||
import * as Localization from 'expo-localization'
|
||||
import i18n from 'i18next'
|
||||
import { initReactI18next } from 'react-i18next'
|
||||
|
||||
@ -128,4 +129,12 @@ i18n.use(initReactI18next).init({
|
||||
}
|
||||
})
|
||||
|
||||
const timezone = Localization.getCalendars()[0].timeZone
|
||||
if (timezone && '__setDefaultTimeZone' in Intl.DateTimeFormat) {
|
||||
try {
|
||||
// @ts-ignore
|
||||
Intl.DateTimeFormat.__setDefaultTimeZone(timezone)
|
||||
} catch {}
|
||||
}
|
||||
|
||||
export default i18n
|
||||
|
@ -1,14 +0,0 @@
|
||||
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
|
Reference in New Issue
Block a user