8000 Merge branch '5.0' · symfony/symfony-docs@5ec126a · GitHub
[go: up one dir, main page]

Skip to content

Commit 5ec126a

Browse files
committed
Merge branch '5.0'
* 5.0: document the reference_date option
2 parents 6d0230b + 76acbc5 commit 5ec126a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

reference/forms/types/time.rst

Lines changed: 20 additions & 0 deletions
8000
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,29 @@ 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+
Configuring a reference date is required when the `model_timezone`_ and
161+
`view_timezone`_ are different. Timezone conversions will be calculated
162+
based on this date.
163+
149164
.. include:: /reference/forms/types/options/seconds.rst.inc
150165

151166
.. include:: /reference/forms/types/options/view_timezone.rst.inc
152167

168+
.. caution::
169+
170+
When using different values for `model_timezone`_ and ``view_timezone``,
171+
a `reference_date`_ must be configured.
172+
153173
widget
154174
~~~~~~
155175

0 commit comments

Comments
 (0)
0