Skip to content

Fix for broken timezone after creating DateTime with timestamp and timezone #19896

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Fix for broken timezone after creating DateTime with timestamp and timezone #19896

wants to merge 1 commit into from

Conversation

mariuszpass
Copy link

Q A
Branch? "master" for new features / 2.7, 2.8 or 3.1 for fixes
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

When creating \DateTime with '@timestamp' and \DateTImeZone, the result object has broken timezone.

DateTimeToLocalizedStringTransformer.php line 136
$dateTime = new \DateTime(sprintf('@%s', $timestamp), new \DateTimeZone($this->outputTimezone));

…timestamp), new \DateTimeZone($this->outputTimezone)) (line 136)
@mvrhov
Copy link

mvrhov commented Sep 9, 2016

Didn't #19879 fix the issue?

@mariuszpass
Copy link
Author

Oh, yes it did.

@mariuszpass mariuszpass closed this Sep 9, 2016
@mariuszpass mariuszpass deleted the DateTimeLocalizedTransform branch September 9, 2016 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants