瀏覽代碼

modify order update datetime error

porklinggit 2 年之前
父節點
當前提交
86cc1b8a84
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      pro.py

+ 4 - 3
pro.py

@@ -548,9 +548,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