Closed pingzh closed 1 year ago
to avoid error: TypeError: can't compare offset-naive and offset-aware datetimes when start_time has timezone
TypeError: can't compare offset-naive and offset-aware datetimes
e.g.
from datetime import datetime, timezone start_time = datetime(2019, 5, 18, 15, 17, tzinfo=timezone.utc) datetime.fromtimestamp(1684416960000/1000) <= start_time
Can you post the code that didn't work so I can confirm?
@Graeme22 updated the description
to avoid error:
TypeError: can't compare offset-naive and offset-aware datetimes
when start_time has timezonee.g.