Преглед на файлове

modify order update datetime error

porklinggit преди 2 години
родител
ревизия
6e87f10701
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  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