From a0af8bfb5bd5a398313d475dab6bb1f3e0729a54 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Fri, 2 Nov 2012 14:32:11 +0100 Subject: [PATCH] [Form] Adapted HTML5 format in DateTimeType as response to a closed ICU ticket --- .../Form/Extension/Core/Type/DateTimeType.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index 4306da7329..d39516827f 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -42,6 +42,8 @@ class DateTimeType extends AbstractType * * "Z" for UTC * * "(-|+)HH:mm" for other timezones (note the colon!) * + * For more information see: + * * http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax * http://www.w3.org/TR/html-markup/input.datetime.html * http://tools.ietf.org/html/rfc3339 @@ -49,13 +51,11 @@ class DateTimeType extends AbstractType * An ICU ticket was created: * http://icu-project.org/trac/ticket/9421 * - * To temporarily circumvent this issue, DateTimeToRfc3339Transformer is used - * when the format matches this constant. - * - * ("ZZZZZZ" is not recognized by ICU and used here to differentiate this - * pattern from custom patterns). + * It was supposedly fixed, but is not available in all PHP installations + * yet. To temporarily circumvent this issue, DateTimeToRfc3339Transformer + * is used when the format matches this constant. */ - const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ssZZZZZZ"; + const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"; private static $acceptedFormats = array( \IntlDateFormatter::FULL,