8000 bug #18821 [2.3][Form] Removed UTC specification with timestamp (fran… · src-run/symfony@0cf017e · GitHub
[go: up one dir, main page]

Skip to content

Commit 0cf017e

Browse files
bug symfony#18821 [2.3][Form] Removed UTC specification with timestamp (francisbesset)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3][Form] Removed UTC specification with timestamp | Q | A | ------------- | --- | Branch? | 2.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a The function `date_parse()` indicates a warning if a timezone is used with the timestamp: `Double timezone specification`. I removed the UTC specification and this time it's more faster! Commits ------- 0d14aac Removed UTC specification with timestamp
2 parents c585134 + 0d14aac commit 0cf017e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function reverseTransform($value)
126126

127127
try {
128128
// read timestamp into DateTime object - the formatter delivers in UTC
129-
$dateTime = new \DateTime(sprintf('@%s UTC', $timestamp));
129+
$dateTime = new \DateTime(sprintf('@%s', $timestamp));
130130
} catch (\Exception $e) {
131131
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
132132
}

0 commit comments

Comments
 (0)
0