[BUG] Different order date hour in order confirmation email
Current Behavior
There is a difference in the time of placing the order in the email confirming the order between storefront and API order
Frontends
Storefornt
This difference is caused by the lack of the timezone cookie in frontend calls. By default, the email template uses the en_GB timezone, and this explains why there is 1 hour difference.
To decide whether it should be handled on the backed side - by removing this solution with timezone or Frontends by adding cookie
Expected Behavior
No response
Steps To Reproduce
No response
Anything else?
No response
Via the store API, you get the UTC dates from the DB. You need to calculate them for the user based on the timezone you get from the browser/cookie. There is no logic for store API routes that handles that for you.
In the default Twig storefront, a Twig Listener looks for the browser's timezone cookie to set the correct timezone in PHP.
src/Storefront/Framework/Twig/TwigDateRequestListener.php
@BrocksiNet should we wait for Your fix or should We do some changes in frontends ?
I would not wait; the fix in the core will take more time. You can also fix it in Frontend.
Ok. Can You explain what should be fixed in frontends ?