Keep arrival trains during 5 minutes
This commit is contained in:
parent
f50391970f
commit
da82ef7950
@ -229,6 +229,7 @@ class NextArrivalsViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
query_time = timedelta(seconds=int(query_time[:2]) * 3600
|
||||
+ int(query_time[3:5]) * 60
|
||||
+ (int(query_time[6:]) if len(query_time) > 6 else 0))
|
||||
query_time -= timedelta(minutes=5) # Keep the last trains of the 5 previous minutes
|
||||
|
||||
yesterday = query_date - timedelta(days=1)
|
||||
time_yesterday = query_time + timedelta(days=1)
|
||||
|
Loading…
Reference in New Issue
Block a user