summaryrefslogtreecommitdiffstats
path: root/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/core/openbb_core/provider/standard_models/index_historical.py')
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/index_historical.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py b/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py
index e6183bf9921..f9a381698cb 100644
--- a/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py
+++ b/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py
@@ -73,7 +73,6 @@ class IndexHistoricalData(Data):
@classmethod
def date_validate(cls, v):
"""Return formatted datetime."""
- v = parser.isoparse(str(v))
- if v.hour == 0 and v.minute == 0:
- return v.date()
- return v
+ if ":" in str(v):
+ return parser.isoparse(str(v))
+ return parser.parse(str(v)).date()