Browse Source

生成时间戳去掉+8h的时间差

locky 3 năm trước cách đây
mục cha
commit
53b7a78974
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Object/UVerifyObject.py

+ 1 - 1
Object/UVerifyObject.py

@@ -37,7 +37,7 @@ class UVerifyObject:
         self.body_data_str = json.dumps({'token': self.token})
         content_md5_str = base64.b64encode(hashlib.md5(self.body_data_str.encode("UTF-8")).digest()).decode("UTF-8")
 
-        now_date_time = datetime.utcnow() + timedelta(hours=8)
+        now_date_time = datetime.utcnow()   # + timedelta(hours=8), 服务器的时间为中时区,不需要+8h的时间差
         timestamp = str(int(time.mktime(now_date_time.timetuple()) * 1000))
 
         sign_headers_dict = {