Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0cf017e

Browse filesBrowse files
bug #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
Copy full SHA for 0cf017e

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.