stanley-king 2 years ago
parent
commit
7e32b72d1f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      plot/refill/DataStream.py

+ 4 - 0
plot/refill/DataStream.py

@@ -1,3 +1,4 @@
+import time
 from abc import ABCMeta, abstractmethod, ABC
 from abc import ABCMeta, abstractmethod, ABC
 from datetime import timedelta
 from datetime import timedelta
 from mpi4py import MPI
 from mpi4py import MPI
@@ -185,6 +186,9 @@ class DataReadStream(metaclass=ABCMeta):
         if len(self._days) == 0:
         if len(self._days) == 0:
             return None
             return None
 
 
+        if time_stamp > int(time.time()):
+            time_stamp = int(time.time())
+
         if left:
         if left:
             min = self._days[0]
             min = self._days[0]
             time_stamp = min if time_stamp < min else time_stamp
             time_stamp = min if time_stamp < min else time_stamp