Skip to content

Commit 4c04125

Browse files
committed
document DateType limitations
1 parent 11b63e3 commit 4c04125

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

reference/forms/types/options/date_input.rst.inc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ your underlying object. Valid values are:
1212
* ``timestamp`` (e.g. ``1307232000``)
1313

1414
The value that comes back from the form will also be normalized back into
15-
this format.
15+
this format.
16+
17+
Note: If ``timestamp`` is used, ``DateType`` is limited to dates between Fri, 13 Dec 1901 20:45:54 GMT and Tue, 19 Jan 2038 03:14:07 GMT on 32bit systems. This is due to a `limitation in PHP itself <http://php.net/manual/en/function.date.php>`_:
18+
19+
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). However, before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).

reference/forms/types/options/date_widget.rst.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ The basic way in which this field should be rendered. Can be one of the followin
1212

1313
* ``single_text``: renders a single input of type text. User's input is validated
1414
based on the `format`_ option.
15+
16+
Note: If ``single_text`` is used, ``DateType`` is limited to dates between Fri, 13 Dec 1901 20:45:54 GMT and Tue, 19 Jan 2038 03:14:07 GMT on 32bit systems. This is due to a `limitation in PHP itself <http://php.net/manual/en/function.date.php>`_:
17+
18+
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). However, before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).

0 commit comments

Comments
 (0)