Browse Source

modify order update datetime error

porklinggit 2 years ago
parent
commit
6e87f10701
1 changed files with 4 additions and 3 deletions
  1. 4 3
      pro.py

+ 4 - 3
pro.py

@@ -565,9 +565,10 @@ class work_server(threading.Thread):
             self.batch_pro()
             tt_check = False
             c_time = time.strftime("%H:%M:%S", time.localtime())
-            if c_time[3:5] == '00':  # 判断截取分钟是否为0
-                if c_time[6:8] == '00':  # 判断截取秒是否为0
-                    tt_check = True
+            if c_time[0:2] == '00':  # 判断截取小时是否为0
+                if c_time[3:5] == '00':  # 判断截取分钟是否为0
+                    if c_time[6:8] == '00':  # 判断截取秒是否为0
+                        tt_check = True
             if tt_check == True:
                 self.update_order_tbl(self.user_var.order_num, end_time=int(time.time()), stat=True)
                 self.user_var.order_count = 1