@@ -13,6 +13,9 @@ TimeZoneField
13
13
.. |datetime.tzinfo | replace :: ``datetime.tzinfo ``
14
14
.. _datetime.tzinfo : https://docs.python.org/2/library/datetime.html#tzinfo-objects
15
15
16
+ .. |datetime.datetime | replace :: ``datetime.datetime ``
17
+ .. _datetime.datetime : https://docs.python.org/2/library/datetime.html#datetime-objects
18
+
16
19
.. |models.CharField | replace :: ``models.CharField ``
17
20
.. _models.CharField : https://docs.djangoproject.com/en/dev/ref/models/fields/#charfield
18
21
@@ -105,8 +108,13 @@ LinkedTZDateTimeField
105
108
the timezone or a string (if the timezone field is
106
109
located on the model).
107
110
:param time_override: Automatically overrides the time value each time the
108
- object is saved to the time that is declared.Must be a
109
- |datetime.time |_ instance.
111
+ object is saved to the time that is declared. Must be
112
+ a |datetime.time |_ instance.
113
+ :raises AttributeError: if the ``populate_from `` parameter is invalid.
114
+ :raises ValueError: if the ``time_override `` is not a |datetime.time |_ instance.
115
+ :raises pytz.UnknownTimeZoneError: if the parsed model instance value of ``populate_from `` is not a valid Olson time zone string.
116
+ :return: A |datetime.datetime |_ object based on the time zone declared in ``populate_from `` and override from ``time_override `` or |None |_.
117
+ :rtype: |datetime.datetime |_
110
118
111
119
.. note :: If ``auto_now`` or ``auto_now_add`` is declared, the value of ``time_override`` is ignored.
112
120
.. caution :: `Django cannot serialize lambdas! <https://docs.djangoproject.com/en/1.7/ref/models/fields/#default>`_
0 commit comments