|
@@ -98,6 +98,7 @@ def getTZ(request):
|
|
|
c = request_dict.get('etk', None)
|
|
|
ip = request_dict.get('ip', None)
|
|
|
lang = request_dict.get('lang', None)
|
|
|
+ update = request_dict.get('update',None)
|
|
|
if not ip:
|
|
|
ip = CommonService.get_ip_address(request)
|
|
|
if c:
|
|
@@ -108,7 +109,10 @@ def getTZ(request):
|
|
|
uid = c.decode('utf-8')
|
|
|
if len(uid) == 20:
|
|
|
print(uid)
|
|
|
- info = CommonService.getIpIpInfo(ip=ip, lang=lang)
|
|
|
+ if update:
|
|
|
+ info = CommonService.getIpIpInfo(ip=ip, lang=lang,update=True)
|
|
|
+ else:
|
|
|
+ info = CommonService.getIpIpInfo(ip=ip, lang=lang,update=False)
|
|
|
try:
|
|
|
tz = info['utc_offset']
|
|
|
# 增加GMT,且补:00
|