-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Date incorrect on pdf invoice #26675
Comments
Thanks for opening this issue! |
Hi @devchris79. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @devchris79 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-Delta. Thank you for working on this issue.
|
Thanks for opening this issue! |
✅ Confirmed by @engcom-Delta Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
@engcom-Delta Why did you edit the post to include a precondition of Locale Storeview: nl_NL? It looks like the date is inserted in: So this may affect other pdf documents like shipping, credit memo etc. |
Credit memos are also affected. |
I think this may be because of the changes in #23693. @edenduong does that sound likely? |
Thanks for opening this issue! |
Hi @devchris79 , Thank you for your issue report. I try to reproduce it on my local site but I can not reproduce in my site. In my commit, I try to change the logic of |
@devchris79 According your steps as its are now, issue is not reproducible. comment adds more details to how reproduce issue and Locale=Dutch (Netherlands) is important thing to reproduce issue |
@magento give me 2.3-develop instance |
Hi @anvanza. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @edenduong Why have you closed this issue? Its been seen by myself, @anvanza and @engcom-Delta Here is our locale options: |
@devchris79 : sorry for my mistake. I didn’t mean that. I reopened it. |
@edenduong No problem :-) Maybe the issue is related to the locale option giving the strange results. It seems @engcom-Delta and @anvanza believe this to be pertinent. |
@magento give me 2.4-develop instance |
I don't know what Magento's plan is for backporting to 2.3. Presumably they are still going to be releasing 2.3.5 etc... so I would assume they will be handling the backporting internally, as we are no longer able to generate backports outside of the magento organisation. In the meantime.... For each issue I care about, that has been merged into 2.4, I create a diff and apply it using the cweagans patching process to my 2.3 installation. At each version release of 2.3, I check each one in turn and if it has been backported into 2.3 by magento, then I remove my local patch. This way, I should be covered in both scenareos. |
Hi, Should the /patches/composer folder created in the root? [Seld\JsonLint\ParsingException] Thanks in advanced, Edwin |
Looks like there is some whitespace on the end of line 133 that it doesn't like. There shouldnt be any whitespace at the ends of the lines in a json file. Probably just copy and pasted across. and yes, the patches folder goes in the root of magento |
If it is working right, on composer install it should remove framework, reinstall framework and then apply the patch. Then you're good to go. Once the patch is integrated into mainline, you can remove it from your composer.json when you update. |
Thanks, I had to add one } extra in the sjon file. The dates in PDFs are correct now. |
I am using Magento 2.3.4 I have applied @edenduong' code to the file located in; /vendor/magento/framework/Stdlib/DateTime/Timezone.php (line 196) ############### public function scopeDate($scope = null, $date = null, $includeTime = false)
################### This corects dates on invoices. |
If you use Magento with composer, there is a diff for you: |
@dudzio12
|
@JustICTNL:
|
Do we have to remove this again before upgrading to the next Magento release? |
You probably should delete it as soon as the new release implementing proper fix will be available. It's good practise to name the patch with issue number just to not get lost in the future:
|
@MarcusWolschon: with |
@dudzio12 and @MarcusWolschon Did I do something wrong, or is there another solution? I had the order date 9-11-2022. In magento is the correct order date. |
Magento directory/composer.json
DIFF file pasted in file: |
This works now for me. i updgraded to Magento 2.3.5-P1 and now it works. I changed above in ./vendor/magento/framework/Stdlib/DateTime/Timezone.php |
@magento-engcom-team It still persisting even on M2.3.5-p2, can we have this ported/merged to p3 maybe? |
This issue still exists in version 2.3.6. |
Patch from https://github.com/magento/magento2/commit/5ebb43bb59b97f5315ae6421fe3c1b04c6affc70.patch do the job (on 2.3.5-p2) |
Just updated to 2.3.7 and issue still extists |
@LaurensGoedel: the issue got fix in Magento 2.4.0 and above, it looks like Magento core devs didn't seem to think it was necessary to backport this fix to the 2.3.x release line. If you still need a fix for 2.3.x, please read through the entire thread, there are plenty of comments that tell you how to apply patches to resolve this issue. |
Still exists in M2.3.7. I used this fix: https://stackoverflow.com/questions/64553446/magento-2-3-4-wrong-order-date-in-invoice-pdf |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
#26665issueInvoice.pdf
The text was updated successfully, but these errors were encountered: