ohlc path fix

This commit is contained in:
tim
2024-08-06 20:00:08 -04:00
parent 77131eb0de
commit 432a1e84b9

View File

@@ -30,7 +30,7 @@ class OHLCFilePath:
self.start = start = datetime(time.year, time.month, time.day, tzinfo=timezone.utc) self.start = start = datetime(time.year, time.month, time.day, tzinfo=timezone.utc)
self.end = self.start + timedelta(days=1) self.end = self.start + timedelta(days=1)
self.file_interval = timedelta(days=1) self.file_interval = timedelta(days=1)
self.filepath += f'{start.year}/{start.month}/{symbol}-{name}-{start:%Y%m%d}.csv' self.filepath += f'{start.year}/{start.month:02}/{symbol}-{name}-{start:%Y%m%d}.csv'
elif period < timedelta(days=1): elif period < timedelta(days=1):
# one file per month # one file per month
# log.debug(f'{name} is monthly') # log.debug(f'{name} is monthly')