Leon vor 1 Jahr
Ursprung
Commit
8597a61f29
3 geänderte Dateien mit 15 neuen und 3 gelöschten Zeilen
  1. 1 1
      package.json
  2. 6 1
      src/pages/clock/Clock.tsx
  3. 8 1
      yarn.lock

+ 1 - 1
package.json

@@ -10,7 +10,7 @@
 	},
 	"scripts": {
 		"build:weapp": "taro build --type weapp",
-        "build_and_upload:weapp": "taro build --type weapp --upload",
+		"build_and_upload:weapp": "taro build --type weapp --upload",
 		"build:swan": "taro build --type swan",
 		"build:alipay": "taro build --type alipay",
 		"build:tt": "taro build --type tt",

+ 6 - 1
src/pages/clock/Clock.tsx

@@ -125,7 +125,12 @@ export default function Page() {
     }
 
     useEffect(() => {
-
+        var moment = require('moment-timezone');
+        var aa = moment(new Date().getTime()).tz("America/Los_Angeles").format('ha z');
+        showAlert({
+            title:'sss',
+            content:aa
+        })
         dispatch(staticResources() as any);
         timer = setInterval(() => {
             var now = new Date()

+ 8 - 1
yarn.lock

@@ -14763,13 +14763,20 @@ mobile-detect@^1.4.2:
   resolved "https://registry.npmmirror.com/mobile-detect/-/mobile-detect-1.4.5.tgz#da393c3c413ca1a9bcdd9ced653c38281c0fb6ad"
   integrity sha512-yc0LhH6tItlvfLBugVUEtgawwFU2sIe+cSdmRJJCTMZ5GEJyLxNyC/NIOAOGk67Fa8GNpOttO3Xz/1bHpXFD/g==
 
-moment-timezone@^0.5.34, moment-timezone@^0.5.45:
+moment-timezone@^0.5.34:
   version "0.5.45"
   resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.45.tgz#cb685acd56bac10e69d93c536366eb65aa6bcf5c"
   integrity sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==
   dependencies:
     moment "^2.29.4"
 
+moment-timezone@^0.5.45:
+  version "0.5.45"
+  resolved "https://registry.npmmirror.com/moment-timezone/-/moment-timezone-0.5.45.tgz#cb685acd56bac10e69d93c536366eb65aa6bcf5c"
+  integrity sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==
+  dependencies:
+    moment "^2.29.4"
+
 moment@^2.29.4:
   version "2.30.1"
   resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"