mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Updated UTC uses to datetime.timezone.utc in docs.
This commit is contained in:
parent
5c2c7277d4
commit
a16132a9c4
@ -407,7 +407,7 @@ Once you're in the shell, explore the :doc:`database API </topics/db/queries>`::
|
|||||||
>>> q.question_text
|
>>> q.question_text
|
||||||
"What's new?"
|
"What's new?"
|
||||||
>>> q.pub_date
|
>>> 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().
|
# Change values by changing the attributes, then calling save().
|
||||||
>>> q.question_text = "What's up?"
|
>>> q.question_text = "What's up?"
|
||||||
|
@ -721,8 +721,8 @@ Usage example::
|
|||||||
{'date': datetime.date(2014, 6, 15),
|
{'date': datetime.date(2014, 6, 15),
|
||||||
'day': datetime.datetime(2014, 6, 16, 0, 0, tzinfo=zoneinfo.ZoneInfo('Australia/Melbourne')),
|
'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')),
|
'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')),
|
'minute': 'minute': datetime.datetime(2014, 6, 15, 14, 30, tzinfo=timezone.utc),
|
||||||
'second': datetime.datetime(2014, 6, 15, 14, 30, 50, tzinfo=zoneinfo.ZoneInfo('UTC'))
|
'second': datetime.datetime(2014, 6, 15, 14, 30, 50, tzinfo=timezone.utc)
|
||||||
}
|
}
|
||||||
|
|
||||||
``TimeField`` truncation
|
``TimeField`` truncation
|
||||||
|
@ -80,7 +80,7 @@ Argument Value
|
|||||||
arguments passed to ``__init__()``)
|
arguments passed to ``__init__()``)
|
||||||
|
|
||||||
``kwargs`` ``{'question_text': "What's new?",``
|
``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``
|
``post_init``
|
||||||
|
Loading…
Reference in New Issue
Block a user