lang 4 жил өмнө
parent
commit
a2a24b30c3

+ 3 - 0
Controller/EquipmentStatus.py

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