-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Backport-2.2] of PR-#11306 Save date time correctly in different timezone and local #13560
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
Conversation
…nt timezone and local
use Magento\Framework\Phrase; | ||
use Magento\Framework\Stdlib\DateTime; |
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.
Please, add an alias for DateTime or use FQCN due to Magento 2.2.x support PHP 7.0 version and this code will fail with fatal error:
Cannot use Magento\Framework\Stdlib\DateTime as DateTime because the name is already in use in /opt/bamboo/builds/MPAF-SPERFEE-CEEC/build-775/lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php on line 14
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.
Thanks for that. I wasn't aware of that bug. Is this 2.2.x specific, as the same commit was made to the 2.3-develop branch.
Fixes problem with Magento 2.2.x < PHP 7.0.13 support due to PHP core bug https://bugs.php.net/bug.php?id=66862
PR not Fixed problem. Preconditions Steps to reproduce Expected result Actual result |
@magento-engcom-team I have been unable to reproduce the failure you are seeing. I am running PHP 7.1.11. What version of PHP are you testing under? |
@gwharton I tested with PHP 7.0.25. |
OK, it seems something deeper is going on here. This PR was just intended to be a copy of the fix that was previously applied to 2.3-develop in PR #11306, as a quick test on my 2.2-dev setup showed the fix to work, so either there is something different in PHP versions, or 2.2/2.3 or the original fix applied to 2.3 is not sufficient. I'm going to withdraw this PR, as I was just replicating the work done by @raumatbel in PR #11306 into 2.2-develop, but it looks like further work may be required. |
It can be still related to lib-icu php component as mentioned in #10485 (comment) No matter what, due to Magento 2 architecture as long there's lib-icu usage dependency problem could persist. |
Description
Backport of PR-#11306 into 2.2-develop
Fixed Issues (if relevant)
#10580 : Set product as new "from" and "to" not being interpreted correctly
#10485 : Error: Invalid input datetime format of value '25/07/+00201717
Contribution checklist