-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Fixed incorrect datetime in block. #1525
Conversation
I do not agree changing the code by replacing if/else sequences with ternary operator ?. The code is just fine as it is the only necessary change should be fixing the issue. Although I understand that you want a compression of the code but it is not beneficial for the reader. It is much easier for me personally to see if/else sequences then ?. If we agree to such changes then we should do so throughout Magento, otherwise we lose the rules initially set. |
I also don't like the 1 line functions, but anyways we need this merged asap |
Is this a BC breaking change? |
I think so, due to addition of new param |
IMHO ... this change to I'd add a new method that covers |
Description (*)
This PR fixes 2 issues:
formatDate()
in the block without converting to store timezone. A use case is when a datetime is stored in the DB in local timezone (or a date such as birthdate, which is independent of timezone), the methodformatDate()
would convert the datetime and couldn't be used for rendering. This PR fixes that. Now, the same method can be used.Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
After:
Questions or comments
Contribution checklist (*)