Browse Source

更新时区

lang 4 years ago
parent
commit
a2a24b30c3
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Controller/EquipmentStatus.py

+ 3 - 0
Controller/EquipmentStatus.py

@@ -124,6 +124,9 @@ def getTZ(request):
                 info = CommonService.getIpIpInfo(ip=ip, lang=lang,update=False)
             try:
                 tz = info['utc_offset']
+                if len(tz) == 0:
+                    info['utc_offset'] = "UTC+8"
+                    info['gmt_offset'] = "GMT+08:00"
                 # 增加GMT,且补:00
                 if len(tz) == 5:
                     gmtz = tz.replace('UTC-', 'GMT-0').replace('UTC+', 'GMT+0')