1- import * as Sentry from '@sentry/react' ;
21import moment from 'moment-timezone' ;
32import { createStore } from 'reflux' ;
43
@@ -12,8 +11,6 @@ interface ConfigStoreDefinition extends StrictStoreDefinition<Config> {
1211 set < K extends keyof Config > ( key : K , value : Config [ K ] ) : void ;
1312}
1413
15- const { warn} = Sentry . logger ;
16-
1714const storeConfig : ConfigStoreDefinition = {
1815 // When the app is booted we will _immediately_ hydrate the config store,
1916 // effecively ensuring this is not empty.
@@ -47,21 +44,7 @@ const storeConfig: ConfigStoreDefinition = {
4744 // TODO(dcramer): abstract this out of ConfigStore
4845 if ( this . state . user ) {
4946 this . state . user . permissions = new Set ( this . state . user . permissions ) ;
50-
51- const systemTimeZone = moment . tz . guess ( ) ;
52- const userTimeZone = this . state . user . options . timezone ;
53-
54- const nowInSystemTimezone = moment . tz ( undefined , systemTimeZone ) ;
55- const nowInUserTimezone = moment . tz ( undefined , userTimeZone ) ;
56-
57- if ( nowInSystemTimezone . utcOffset ( ) !== nowInUserTimezone . utcOffset ( ) ) {
58- warn ( 'System time zone does not match user preferences time zone' , {
59- systemTimeZone,
60- userTimeZone,
61- } ) ;
62- }
63-
64- moment . tz . setDefault ( userTimeZone ) ;
47+ moment . tz . setDefault ( this . state . user . options . timezone ) ;
6548 }
6649
6750 this . trigger ( this . state ) ;
0 commit comments