Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[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

Merged
nicolas-grekas merged 1 commit intosymfony:2.3fromfrancisbesset:patch-3
May 30, 2016

Conversation

@francisbesset
Copy link
Contributor

@francisbessetfrancisbesset commentedMay 20, 2016
edited
Loading

QA
Branch?2.3
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

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!

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'));

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?

Copy link
ContributorAuthor

@francisbessetfrancisbessetMay 24, 2016
edited
Loading

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! 👍

Source:
strip-le-pm-et-le-tsu-650-finalenglish-2

@francisbessetfrancisbesset changed the title[Form] Used second arg of DateTime to specify timezone[Form] Removed UTC specification with timestampMay 24, 2016
@francisbessetfrancisbesset changed the title[Form] Removed UTC specification with timestamp[2.3][Form] Removed UTC specification with timestampMay 24, 2016
@nicolas-grekas
Copy link
Member

👍

@nicolas-grekas
Copy link
Member

Thank you@francisbesset.

@nicolas-grekasnicolas-grekas merged commit0d14aac intosymfony:2.3May 30, 2016
nicolas-grekas added a commit that referenced this pull requestMay 30, 2016
…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
@fabpotfabpot mentioned this pull requestMay 30, 2016
This was referencedJun 6, 2016
@fabpotfabpot mentioned this pull requestJun 15, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@francisbesset@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp