-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Set product as new "from" and "to" not being interpreted correctly #10580
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
Comments
GB locale is not builtin https://github.com/magento/magento2/tree/develop/app/i18n/Magento, is there a publicly available link to the one you used? |
Hi, php bin/magento setup:static-content:deploy en_GB en_US Under the admin pages, click arrow next to username in top right->Account Setting-Interface Locale->English (United States) Product->Misc->Set Product New From ->Use Calendar and set 31st August 2017. Save Product OK, No error. Under the admin pages, click arrow next to username in top right->Account Setting-Interface Locale->English (United Kingdom) Product->Misc->Set Product New From ->Use Calendar and set 31st August 2017. Save Product -> ERROR Invalid input datetime format of value '31/08/2017' |
@gwharton thanks, I was not aware en_GB was always there, just without separate translation files. |
Hi @gwharton. |
also happens on fa_IR |
I have date problems also on lt_LT. Actually I can not save correct date. The date field shows 201717-08-30 instead of 2017-08-30 after page reloads. And when I look to the database I see 1717-08-30. Change locale to en_US fix this issue as suggested by #10485 (comment) |
Duplicate of #10472 ? |
This is happening with pt_BR language too. |
More insane and very serious bugs. So far Magento 2 has been such a rocky road. Endlessly need to keep patching/investigating problems in the core code. |
I'm having the same issue. I just updated "module-ui/Component/Form/Element/DataType/Date.php" prepare() method to set timeOffset only which seems to have fixed it. However need to do a full test to make sure it has not affected other modules that might be relying on storeTimeZone, dateFormat & storeLocale. Update: so far didn't find an issue with the update, so if anyone interested here is the code change. |
@gwharton, thank you for your report. |
It also happens for es_ES this I am using magento 2.1.9, setup on clean, PHP version 7.0.23 |
thanks @Tomasz-Silpion , I made upgrade to 2.2 and works fine :) |
Just so we are clear @devhero-tech and @Tomasz-Silpion, this github issue is regarding the month and date being the wrong way round for several locales. i.e when you request 30/10/2017 in the UK (and i suspect any locale where the day comes before the month), it says it is invalid, because it thinks you are trying to set the date to the 10th day of the 30th month. The issue that the above patch is fixing is where the datetime string is being interpreted as 01/01/+00201717 etc. which is a separate issue and covered under #10485 |
If you have the locale set to es_ES, product import fails to due this date format issue |
Same for de_DE on 2.1.9 |
I have installed magento 2.2.0. It continues not working after 2 years. |
:) |
@orlangur ... 2 years or 6 months, Problems with dates and internationalization make Magento 2 almost unfeasible :( |
we will probably see this fixed on 2.3 and not being backported to 2.1 and 2.2... |
This is in fact a major problem when you work with clients. Enough papercut-like problems like these undermine the credibility of the whole platform. However, there is a fix available, which works at least for 2.1.x: adapted for de_DE: |
@luckyduck , this module have many fails. It does not correct all the bugs of all modules that magento 2.x appears. Example: Marketing Module and Reports continue not working with this module. |
@sergiomendonca Agreed. Just wanted to point out that there is a solution to some of the problems. At least in my case (advanced pricing / from/to), that helped me a lot. |
Thanks by the feedback. I think its the one solution until here. |
I think I have the solution for this problem. |
Hi @gwharton. Thank you for your report. The fix will be available with the upcoming 2.3.0 release. |
About all filters date? Order filter by date, invoice filter by date, customer filter by date, page filter by date. All of them is in en_us format and its not possible to make something different without change the core code of magento 2. Someone know about this issue? I downloaded the v2.2 and all the filters that i told is not fixed. |
Seems to be fixed in 2.2 now |
that's not true. |
still not working for bg_BG in 2.3.1 |
Still not working for nl_NL in 2.3.4 |
Can confirm still not working for ar_SA in 2.3.5-p1 |
Preconditions
Steps to reproduce
Expected result
Actual result
Looks like month and day have been interchanged.
You can also get an error when you try to set a date like 31st Aug 2017, which it says is invalid. Presumably trying to set the 8th day of the 31st month.
May be GB specific due to having date specification dd/mm/yy instead of the US mm/dd/yy
The text was updated successfully, but these errors were encountered: