sc-common-interface 2.8.9__tar.gz → 2.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc_common_interface
3
- Version: 2.8.9
3
+ Version: 2.9.0
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -8,7 +8,7 @@ import random
8
8
  import hmac
9
9
  from hashlib import sha1
10
10
  import random
11
- from datetime import *
11
+
12
12
 
13
13
  def delete_post(data):
14
14
  env = data["env"]
@@ -947,12 +947,13 @@ def get_stamp_time(data):
947
947
  time_type = data.get("time_type","add")
948
948
  unit = data.get("unit","minutes")
949
949
  # 获取当前 UTC 时间
950
- now = datetime.now()
950
+ now = datetime.datetime.now()
951
951
  if time_type not in {"add", "sub"}:
952
952
  raise ValueError("Invalid time_type. Use 'add' or 'sub'.")
953
- stamp_time = now + timedelta(**{unit:num if time_type == "add" else -num})
953
+ stamp_time = now + datetime.timedelta(**{unit:num if time_type == "add" else -num})
954
954
  return int(stamp_time.timestamp()*1000)
955
955
 
956
+
956
957
  def get_line_info(data):
957
958
  env = data["env"]
958
959
  headers = data["headers"]
@@ -2456,7 +2457,7 @@ def get_merchant_currency(data):
2456
2457
  if __name__=="__main__":
2457
2458
  stamp1 = get_stamp_time({"num":5040})
2458
2459
  print(stamp1)
2459
- stamp2 = get_stamp_time({"num": 5041})
2460
+ stamp2 = get_stamp_time({"num": 6000})
2460
2461
  print(stamp2)
2461
2462
 
2462
2463
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.8.9
3
+ Version: 2.9.0
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='sc_common_interface',
5
- version='2.8.9',
5
+ version='2.9.0',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),