8000 Merge branch '4.4' into 5.0 · symfony/symfony-docs@43445da · GitHub
[go: up one dir, main page]

Skip to content

Commit 43445da

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: document the reference_date option
2 parents f31423d + 47f3d57 commit 43445da

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

reference/forms/types/time.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ stored as a ``DateTime`` object, a string, a timestamp or an array.
2323
| | - `input_format`_ |
2424
| | - `minutes`_ |
2525
| | - `model_timezone`_ |
26+
| | - `reference_date`_ |
2627
| | - `seconds`_ |
2728
| | - `view_timezone`_ |
2829
| | - `widget`_ |
@@ -146,10 +147,33 @@ of the time. This must be a valid `PHP time format`_.
146147

147148
.. include:: /reference/forms/types/options/model_timezone.rst.inc
148149

150+
.. caution::
151+
152+
When using different values for ``model_timezone`` and `view_timezone`_,
153+
a `reference_date`_ must be configured.
154+
155+
reference_date
156+
~~~~~~~~~~~~~~
157+
158+
**type**: ``DateTimeInterface`` **default**: ``null``
159+
160+
.. versionadded:: 4.4
161+
162+
The ``reference_date`` option was introduced in Symfony 4.4.
163+
164+
Configuring a reference date is required when the `model_timezone`_ and
165+
`view_timezone`_ are different. Timezone conversions will be calculated
166+
based on this date.
167+
149168
.. include:: /reference/forms/types/options/seconds.rst.inc
150169

151170
.. include:: /reference/forms/types/options/view_timezone.rst.inc
152171

172+
.. caution::
173+
174+
When using different values for `model_timezone`_ and ``view_timezone``,
175+
a `reference_date`_ must be configured.
176+
153177
widget
154178
~~~~~~
155179

0 commit comments

Comments
 (0)
0