Fix naive timezone for /daily command

This commit is contained in:
Antoine Merino 2021-11-06 13:14:15 +01:00
parent d5acd979dc
commit d0e192e20f
No known key found for this signature in database
GPG Key ID: E53AF74E9DC0C53E

View File

@ -251,7 +251,7 @@ class RPC:
def _rpc_daily_profit(
self, timescale: int,
stake_currency: str, fiat_display_currency: str) -> Dict[str, Any]:
today = datetime.utcnow().date()
today = datetime.now(timezone.utc).date()
profit_days: Dict[date, Dict] = {}
if not (isinstance(timescale, int) and timescale > 0):