Explorar o código

Refs #32366 -- Avoided use of datetime.utcnow() in the documentation.

Nick Pope %!s(int64=3) %!d(string=hai) anos
pai
achega
69ffb1acf3
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      docs/topics/i18n/timezones.txt

+ 1 - 2
docs/topics/i18n/timezones.txt

@@ -535,10 +535,9 @@ Troubleshooting
 
    Let's reproduce this error by comparing a naive and an aware datetime::
 
-       >>> import datetime
        >>> from django.utils import timezone
-       >>> naive = datetime.datetime.utcnow()
        >>> aware = timezone.now()
+       >>> naive = timezone.make_naive(aware)
        >>> naive == aware
        Traceback (most recent call last):
        ...