Explorar el Código

modify order update datetime error

porklinggit hace 2 años
padre
commit
86cc1b8a84
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  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