Skip to content

Commit

Permalink
bug #18821 [2.3][Form] Removed UTC specification with timestamp (fran…
Browse files Browse the repository at this point in the history
…cisbesset)

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
  • Loading branch information
nicolas-grekas committed May 30, 2016
2 parents c585134 + 0d14aac commit 0cf017e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -126,7 +126,7 @@ public function reverseTransform($value)

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

0 comments on commit 0cf017e

Please sign in to comment.