diff options
| author | Diane DeMers Chen <purplediane@users.noreply.github.com> | 2022-10-20 15:52:45 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-10-20 15:53:59 -0700 |
| commit | 2611ecd5d981df17b1e150719c1bb16af85fce0a (patch) | |
| tree | f9e96f9a8724b83d65e03849cfc53337fc630d68 /docs | |
| parent | 84814412a032742e5ccef576b24dbaa0ef25fe06 (diff) | |
[4.1.x] Updated UTC uses to datetime.timezone.utc in docs.
Backport of a16132a9c4b32f9580cdda98a2711ae7261c2576 from main
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/intro/tutorial02.txt | 2 | ||||
| -rw-r--r-- | docs/ref/models/database-functions.txt | 4 | ||||
| -rw-r--r-- | docs/ref/signals.txt | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt index ee0707456d..b37d0c036b 100644 --- a/docs/intro/tutorial02.txt +++ b/docs/intro/tutorial02.txt @@ -407,7 +407,7 @@ Once you're in the shell, explore the :doc:`database API </topics/db/queries>`:: >>> q.question_text "What's new?" >>> q.pub_date - datetime.datetime(2012, 2, 26, 13, 0, 0, 775217, tzinfo=<UTC>) + datetime.datetime(2012, 2, 26, 13, 0, 0, 775217, tzinfo=datetime.timezone.utc) # Change values by changing the attributes, then calling save(). >>> q.question_text = "What's up?" diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt index acca4a7c68..596e5ed9b4 100644 --- a/docs/ref/models/database-functions.txt +++ b/docs/ref/models/database-functions.txt @@ -716,8 +716,8 @@ Usage example:: {'date': datetime.date(2014, 6, 15), 'day': datetime.datetime(2014, 6, 16, 0, 0, tzinfo=zoneinfo.ZoneInfo('Australia/Melbourne')), 'hour': datetime.datetime(2014, 6, 16, 0, 0, tzinfo=zoneinfo.ZoneInfo('Australia/Melbourne')), - 'minute': 'minute': datetime.datetime(2014, 6, 15, 14, 30, tzinfo=zoneinfo.ZoneInfo('UTC')), - 'second': datetime.datetime(2014, 6, 15, 14, 30, 50, tzinfo=zoneinfo.ZoneInfo('UTC')) + 'minute': 'minute': datetime.datetime(2014, 6, 15, 14, 30, tzinfo=timezone.utc), + 'second': datetime.datetime(2014, 6, 15, 14, 30, 50, tzinfo=timezone.utc) } ``TimeField`` truncation diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt index 5180826e68..77a7d7ff58 100644 --- a/docs/ref/signals.txt +++ b/docs/ref/signals.txt @@ -80,7 +80,7 @@ Argument Value arguments passed to ``__init__()``) ``kwargs`` ``{'question_text': "What's new?",`` - ``'pub_date': datetime.datetime(2012, 2, 26, 13, 0, 0, 775217, tzinfo=<UTC>)}`` + ``'pub_date': datetime.datetime(2012, 2, 26, 13, 0, 0, 775217, tzinfo=datetime.timezone.utc)}`` ========== =============================================================== ``post_init`` |
