mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Confirm support for Django 4.1
Replaces deprecated `django.utils.timezone.utc` with `datetime.timezone.utc` (available since Python 3.2).
This commit is contained in:
@@ -214,10 +214,9 @@ an :ref:`unsupported feature <unsupported-features>` error.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from django.utils.timezone import utc
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
message.send_at = datetime.now(utc) + timedelta(hours=1)
|
||||
message.send_at = datetime.now(timezone.utc) + timedelta(hours=1)
|
||||
|
||||
To avoid confusion, it's best to provide either an *aware*
|
||||
`~datetime.datetime` (one that has its tzinfo set), or an
|
||||
|
||||
Reference in New Issue
Block a user