-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Use localised time when displaying order date. #34687
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
Test Results SummaryCommit SHA: 7bda141
To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
|
Tested on a UTC+2 shop, creating an order at 9h local time. Without the fix: With the fix: So yes, the fix seems to be working as expected. |
|
Hi @Konamiman, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
* Use localised time when displaying order date. (#34687) * Cherry pick fix and prep for 6.9.2 release Co-authored-by: Vedanshu Jain <[email protected]>
|
I've updated to WooCommerce 6.9.2 but still have the issue! My timezone is UTC-3 (Brazil), language: pt_BR. |
|
Hi @falkdav, this fix will be included in WooCommerce 7.0. WooCommerce 6.9.2 was a fix release built on top of the 6.9.0 branch and doesn't include this change (we only include fixes for critical issues in fix releases). As a hint, you can always look at the "Milestone" section in the sidebar of a merged pull request to know in which release version will it be included: |
|
Actually, this fix was also included in 6.9.2 as part of the fix release process, even though the milestone is set to 7.0. Note that if an order is updated from the wp-admin while the bug was present, then it may have changed the created date which is what you might be seeing. You can manually switch back the order created date. To confirm, can you verify if this happens for a new order as well (or an old order that was not updated while the bug was active during WC 6.9 or WC 6.9.1)? |

All Submissions:
Changes proposed in this Pull Request:
In #33638, we updated usage of $post->post_date with $order->get_created_date(). Unfortunately, this also induced a bug because by default, created_at functions returns a GMT based date. So when displaying, we will display a GMT-based date in the order details box, which when updated, will be set as the actual created date.
This PR fixes the issue by using a timezone offset date-time instead.
How to test the changes in this Pull Request:
Other information:
pnpm changelog add --filter=<project>?FOR PR REVIEWER ONLY: