Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[2.3][Form] Removed UTC specification with timestamp#18821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| try { | ||
| // read timestamp into DateTime object - the formatter delivers in UTC | ||
| $dateTime =new \DateTime(sprintf('@%s UTC',$timestamp)); | ||
| $dateTime =new \DateTime(sprintf('@%s',$timestamp),new \DateTimeZone('UTC')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
is it better? any benefit?
francisbessetMay 24, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@nicolas-grekas After bench, the usage of a DateTimeZone is slower 👎
But the functiondate_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! 👍
nicolas-grekas commentedMay 29, 2016
👍 |
nicolas-grekas commentedMay 30, 2016
Thank you@francisbesset. |
…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/aThe 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

Uh oh!
There was an error while loading.Please reload this page.
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!