From f18d48205d8213b10425c6778e100c6beb0363be Mon Sep 17 00:00:00 2001 From: Darryl Melander Date: Fri, 9 Apr 2021 13:51:14 -0600 Subject: [PATCH] Don't include end_time in model instances returned from a parsed_cache --- egret/parsers/rts_gmlc/parsed_cache.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/egret/parsers/rts_gmlc/parsed_cache.py b/egret/parsers/rts_gmlc/parsed_cache.py index e81db208..fb0c52a6 100644 --- a/egret/parsers/rts_gmlc/parsed_cache.py +++ b/egret/parsers/rts_gmlc/parsed_cache.py @@ -16,6 +16,7 @@ from datetime import datetime import copy +from datetime import timedelta from egret.data.model_data import ModelData @@ -83,6 +84,9 @@ def populate_skeleton_with_data(self, skeleton_dict:dict, simulation_type:str, end_time:datetime The earliest time to NOT include in the returned data """ + + #Because pandas includes the end of a range, reduce our end time by one second + end_time = end_time - timedelta(seconds=1) self._process_timeseries_data(skeleton_dict, simulation_type, begin_time, end_time) self._insert_system_data(skeleton_dict, simulation_type, begin_time, end_time)