leon hai 1 ano
pai
achega
d8070990c8

+ 5 - 0
src/features/daynight/DayNightCard.tsx

@@ -578,6 +578,11 @@ export default function DayNightCard(props: { isNight: boolean, count: number })
     function detailModalContent() {
         var split = new Date().toString().split(' ');
         var timezone = split[split.length - 2];
+        split.map(item => {
+            if (item.indexOf('GMT') != -1) {
+                timezone = item;
+            }
+        })
         if (!authInfo || !(authInfo as any).lat) {
             return <View style={{ height: 100, display: 'flex', alignItems: 'center', justifyContent: 'center', width: rpxToPx(750) }}>
                 <Text>暂无位置信息</Text>

+ 3 - 0
src/features/daynight/DayNightDetailPopup.tsx

@@ -308,12 +308,15 @@ export default function DayNightDetailPopup(props: {
         if (props.authInfo && props.authInfo.timezone_id) {
             var t1 = dayjs(now.getTime()).tz(props.authInfo.timezone_id)
             if (now.getHours() == t1.hour() && now.getMinutes() == t1.minute()) {
+                console.log('a')
                 return false
             }
             else {
+                console.log('b')
                 return true
             }
         }
+        console.log('c')
         return false
     }
 

+ 5 - 0
src/features/trackTimeDuration/components/CircadianDetailPopup.tsx

@@ -71,6 +71,11 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
     function checkTimezone() {
         var split = new Date().toString().split(' ');
         var currentTZ = split[split.length - 2];
+        split.map(item => {
+            if (item.indexOf('GMT') != -1) {
+                currentTZ = item;
+            }
+        })
         var isDiff = false;
         var isMulti = false;
         var tempTZ = '';

+ 5 - 0
src/features/trackTimeDuration/components/RecordFastSleep.tsx

@@ -106,6 +106,11 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
     function checkTimezone() {
         var split = new Date().toString().split(' ');
         var currentTZ = split[split.length - 2];
+        split.map(item => {
+            if (item.indexOf('GMT') != -1) {
+                currentTZ = item;
+            }
+        })
         var isDiff = false;
         var isMulti = false;
         var tempTZ = '';

+ 5 - 0
src/pages/clock/Clock.tsx

@@ -407,6 +407,11 @@ export default function Page() {
         }
         var split = new Date().toString().split(' ');
         var timeZoneFormatted = split[split.length - 2];
+        split.map(item => {
+            if (item.indexOf('GMT') != -1) {
+                timeZoneFormatted = item;
+            }
+        })
         var timeZoneId = ''
         if (Taro.getSystemInfoSync().platform == 'ios') {
             timeZoneId = dayjs.tz.guess()

+ 0 - 1
src/services/http/request.ts

@@ -72,7 +72,6 @@ export async function request<T>(param: RequestParam): Promise<T> {
                 timeZoneFormatted = item;
             }
         })
-        console.log(split, timeZoneFormatted);
         // var timeZoneLocation = Intl.DateTimeFormat().resolvedOptions().timeZone
 
         header['content-type'] = 'application/json'