__repr__ should use utc datetime...

This commit is contained in:
Matthias
2024-01-03 17:46:30 +01:00
parent 7a6888dfd3
commit b6a71f2d2a

View File

@@ -146,7 +146,7 @@ class Order(ModelBase):
return (f"Order(id={self.id}, trade={self.ft_trade_id}, order_id={self.order_id}, "
f"side={self.side}, filled={self.safe_filled}, price={self.safe_price}, "
f"status={self.status}, date={self.order_date:{DATETIME_PRINT_FORMAT}})")
f"status={self.status}, date={self.order_date_utc:{DATETIME_PRINT_FORMAT}})")
def update_from_ccxt_object(self, order):
"""
@@ -542,7 +542,9 @@ class LocalTrade:
f"{self.trading_mode.value} trading requires param interest_rate on trades")
def __repr__(self):
open_since = self.open_date.strftime(DATETIME_PRINT_FORMAT) if self.is_open else 'closed'
open_since = (
self.open_date_utc.strftime(DATETIME_PRINT_FORMAT) if self.is_open else 'closed'
)
return (
f'Trade(id={self.id}, pair={self.pair}, amount={self.amount:.8f}, '