浏览代码

修复tz时区格式

lang 3 年之前
父节点
当前提交
559282e535
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Service/CommonService.py

+ 2 - 2
Service/CommonService.py

@@ -202,9 +202,9 @@ class CommonService:
         print(lang)
         try:
             tz = tz.replace(':', '.')
+            n_time = int(n_time) + 3600 * float(tz)
         except:
-            tz = 0
-        n_time = int(n_time) + 3600 * float(tz)
+            n_time = int(n_time)
         if lang == 'cn':
             return time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(int(n_time)))
         else: