fix ISO8601 format parsing with utc=True
This commit is contained in:
1 parent
3a2a4ef6de
commit
578d2981d8
1 file changed
+1
-1
@@ -621,7 +621,7 @@ def log_indicators(timestamp, symbol, price, volume, rsi_val, adx_val, atr_val,
|
||||
if INDICATORS_PATH.exists():
|
||||
existing = pd.read_csv(INDICATORS_PATH)
|
||||
df = pd.concat([existing, df], ignore_index=True)
|
||||
df['timestamp'] = pd.to_datetime(df['timestamp'], utc=True)
|
||||
df['timestamp'] = pd.to_datetime(df['timestamp'], format='ISO8601', utc=True)
|
||||
cutoff_date = pd.Timestamp.now(tz='UTC') - timedelta(days=7)
|
||||
df = df[df['timestamp'] > cutoff_date]
|
||||
|
||||
|
||||
Reference in new issue
Block a user