aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_base.py
diff options
context:
space:
mode:
authorGravatar Boris Muratov <[email protected]>2021-10-22 21:52:09 +0300
committerGravatar GitHub <[email protected]>2021-10-22 18:52:09 +0000
commit913b1d5644b57fd900474b8d9bc271e24ea729de (patch)
tree551ca34af549fecb97fd0e592a8edf6c66cae71a /tests/test_base.py
parentMerge pull request #1904 from python-discord/modlog/explicit-thread-name (diff)
Move to timezone aware datetimes (#1895)
* Move to timezone aware datetimes With the shift of the discord.py library to timezone aware datetimes, this commit changes datetimes throughout the bot to be in the UTC timezone accordingly. This has several advantages: - There's no need to discard the TZ every time the datetime of a Discord object is fetched. - Using TZ aware datetimes reduces the likelihood of silently adding bugs into the codebase (can't compare an aware datetime with a naive one). - Our DB already stores datetimes in UTC, but we've been discarding the TZ so far whenever we read from it. Specific places in the codebase continue using naive datetimes, mainly for UI purposes (for examples embed footers use naive datetimes to display local time). * Improve ISODateTime converter documentation Co-authored-by: Kieran Siek <[email protected]>
Diffstat (limited to 'tests/test_base.py')
0 files changed, 0 insertions, 0 deletions