Closed DJTOMATO closed 8 months ago
Thank you! What's the advantage of doing timezone like this? I thought the other one worked, to get it to compare datetime with the timezone-aware discord datetime.
if alert and (datetime.utcnow().astimezone(timezone.utc) - activity.created_at).total_seconds() > 60 * alert['delay_minutes']:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: can't subtract offset-naive and offset-aware datetimes
As it was before one included the timezone and the other didn't. works on cog reload now, but im waiting for tests +30, 60+90 minutes, etc
I think it worked fine before: datetime.now(timezone.utc)
. I had recently fixed it.
It seems to work now though, so no reason to change it back.
i think I messed up, now doesn't throw errors, but reports as soon as someone opens the app (doing lots of spam), it's not doing the time calculation right =(