From 4c04125fe8b056d879aaeb1a43033e9c53135ea7 Mon Sep 17 00:00:00 2001 From: Joel Clermont Date: Sat, 30 Mar 2013 08:39:15 -0400 Subject: [PATCH 1/3] document DateType limitations --- reference/forms/types/options/date_input.rst.inc | 6 +++++- reference/forms/types/options/date_widget.rst.inc | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/reference/forms/types/options/date_input.rst.inc b/reference/forms/types/options/date_input.rst.inc index 04c86da0135..d8059db18a0 100644 --- a/reference/forms/types/options/date_input.rst.inc +++ b/reference/forms/types/options/date_input.rst.inc @@ -12,4 +12,8 @@ your underlying object. Valid values are: * ``timestamp`` (e.g. ``1307232000``) The value that comes back from the form will also be normalized back into -this format. \ No newline at end of file +this format. + +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 `_: + + 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). \ No newline at end of file diff --git a/reference/forms/types/options/date_widget.rst.inc b/reference/forms/types/options/date_widget.rst.inc index 8fc89e3d09e..6c4407b0ffb 100644 --- a/reference/forms/types/options/date_widget.rst.inc +++ b/reference/forms/types/options/date_widget.rst.inc @@ -12,3 +12,7 @@ The basic way in which this field should be rendered. Can be one of the followin * ``single_text``: renders a single input of type text. User's input is validated based on the `format`_ option. + +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 `_: + + 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). \ No newline at end of file From d23b9b23b53d1ed430c7b83b7b0b8f2e48de8d96 Mon Sep 17 00:00:00 2001 From: Joel Clermont Date: Sat, 30 Mar 2013 08:49:31 -0400 Subject: [PATCH 2/3] breaking lines to <80 characters --- reference/forms/types/options/date_input.rst.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/options/date_input.rst.inc b/reference/forms/types/options/date_input.rst.inc index d8059db18a0..50e154b5855 100644 --- a/reference/forms/types/options/date_input.rst.inc +++ b/reference/forms/types/options/date_input.rst.inc @@ -14,6 +14,12 @@ your underlying object. Valid values are: The value that comes back from the form will also be normalized back into this format. -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 `_: +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 `_: - 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). \ No newline at end of file + 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). \ No newline at end of file From 7dacc671f01ab8bf22f35933b06de58f563766bb Mon Sep 17 00:00:00 2001 From: Joel Clermont Date: Sat, 30 Mar 2013 09:01:39 -0400 Subject: [PATCH 3/3] moved note into separate include. removed blockquote from PHP manual --- reference/forms/types/options/_date_limitation.rst.inc | 5 +++++ reference/forms/types/options/date_input.rst.inc | 10 +--------- reference/forms/types/options/date_widget.rst.inc | 4 +--- 3 files changed, 7 insertions(+), 12 deletions(-) create mode 100644 reference/forms/types/options/_date_limitation.rst.inc diff --git a/reference/forms/types/options/_date_limitation.rst.inc b/reference/forms/types/options/_date_limitation.rst.inc new file mode 100644 index 00000000000..8a39d6f6b80 --- /dev/null +++ b/reference/forms/types/options/_date_limitation.rst.inc @@ -0,0 +1,5 @@ +.. caution:: + + 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 `_. \ No newline at end of file diff --git a/reference/forms/types/options/date_input.rst.inc b/reference/forms/types/options/date_input.rst.inc index 50e154b5855..89aa73bc432 100644 --- a/reference/forms/types/options/date_input.rst.inc +++ b/reference/forms/types/options/date_input.rst.inc @@ -14,12 +14,4 @@ your underlying object. Valid values are: The value that comes back from the form will also be normalized back into this format. -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 `_: - - 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). \ No newline at end of file +.. include:: /reference/forms/types/options/_date_limitation.rst.inc \ No newline at end of file diff --git a/reference/forms/types/options/date_widget.rst.inc b/reference/forms/types/options/date_widget.rst.inc index 6c4407b0ffb..50041e432c0 100644 --- a/reference/forms/types/options/date_widget.rst.inc +++ b/reference/forms/types/options/date_widget.rst.inc @@ -13,6 +13,4 @@ The basic way in which this field should be rendered. Can be one of the followin * ``single_text``: renders a single input of type text. User's input is validated based on the `format`_ option. -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 `_: - - 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). \ No newline at end of file +.. include:: /reference/forms/types/options/_date_limitation.rst.inc \ No newline at end of file