Przeglądaj źródła

use next quarter minutes for generate temporary targets

chenhaiyang 4 lat temu
rodzic
commit
f069d2a37c
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/controllers/targets.py

+ 1 - 1
app/controllers/targets.py

@@ -61,7 +61,7 @@ class TargetController(Controller):
 
     async def generate_temporary(self, lower, upper):
         now_str = get_time_str()
-        time_index = arrow.get(arrow.get(now_str, TIME_FMT).timestamp
+        time_index = arrow.get(arrow.get(now_str, TIME_FMT).shift(minutes=15).timestamp
                                // (15 * 60) * (15 * 60)).time().strftime('%H%M%S')
         result = {time_index: [lower, upper]}
         self._results.update({'temporary_targets': result})