2022-05-08 17:56:26 +02:00
|
|
|
import * as Localization from 'expo-localization'
|
|
|
|
import log from './log'
|
|
|
|
|
|
|
|
const timezone = () => {
|
2022-12-03 21:56:52 +01:00
|
|
|
log('log', 'Timezone', Localization.getCalendars()[0].timeZone || 'unknown')
|
2022-05-08 17:56:26 +02:00
|
|
|
if ('__setDefaultTimeZone' in Intl.DateTimeFormat) {
|
|
|
|
// @ts-ignore
|
2022-12-03 21:56:52 +01:00
|
|
|
Intl.DateTimeFormat.__setDefaultTimeZone(Localization.getCalendars()[0].timeZone)
|
2022-05-08 17:56:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default timezone
|