From 34491829675033e41715648b1e92f339bf2f35d1 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 25 八月 2022 17:51:10 +0800
Subject: [PATCH] Changes

---
 tool.py |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/tool.py b/tool.py
index 0139b2f..3ed5f10 100644
--- a/tool.py
+++ b/tool.py
@@ -25,6 +25,19 @@
     return _decimal.quantize(decimal.Decimal("0.00"), decimal.ROUND_HALF_UP)
 
 
+# 鏄惁涓轰氦鏄撴椂闂�
+def is_trade_time():
+    relative_timestamp = t.time() % (24 * 60 * 60) + 8 * 60 * 60
+    start1 = 60 * 60 * 9 + 24 * 60;
+    end1 = 60 * 60 * 11 + 35 * 60;
+    start2 = 60 * 60 * 12 + 50 * 60;
+    end2 = 60 * 60 * 15 + 5 * 60;
+    if start1 < relative_timestamp < end1 or start2 < relative_timestamp < end2:
+        return True
+    else:
+        return False
+
+
 if __name__=="__main__":
      d1 = decimal.Decimal("0.12")
      d2 = decimal.Decimal("0.12")

--
Gitblit v1.8.0