-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Error: Invalid input datetime format of value '25/07/+00201717' #10485
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
Further investigation shows that the issue is caused by 3 specific dates:
These three date forms got populated after the update. They were not under 2.1.7. When these fields are emptied the product save is successful. |
So I was able to figure out why this happens. The moment.js library returns invalid date format if the account locale is set to "en_GB". If this is the case then moment.js returns ""DD/MM/YYYYYYYY" as format for the date. A workaround for this issue is to change your account locale to something else like English / United States. Maybe @magento-team should consider updating the library to 2.18.1 |
Cannot save product, this issue started after updating to magento 2.1.8. Huge bug as it does not allow product modification. Not sure what else it does but so far have noticed product has issue. |
@denchev Changed to locale from magento admin from english australia to english US, still could not save the product. Pretty sad that each release come with such massive issues. |
@s00071609 I am sorry to hear that you also have this issue. Did you change your account's locale or did you change the store's locale? Account locale is the one that did the trick for me. |
@denchev I changed from store>configuration. Where is the account locale? |
@denchev I found it - account locale. And it works. I hope it does not cause any other issue. Great solution. Thank you |
@s00071609 Glad it worked out for you as well. Two people experiencing this issue is an indication that it is a problem that needs to be looked after. |
We are experiencing similar problems with price rules in Magento 2.1.8. After switching the locale to de_DE (with and without german language pack) the validation of a selected from or to date fails. The only difference to 2.1.7 we noticed is the date format the Datepicker returns for validation. en_US works fine as workaround but is no real option for us. |
Hello, @denchev. According to Your issue an internal ticket has been created - MAGETWO-71936. You'll be informed as the bug is fixed. Thanks for reporting. |
i have also the same issue, when comes a new update of magento? |
@denchev thank you for your bug report. |
Same problem here. |
The same problem in it-IT |
Updated to magento 2.2.0 and continues the problem when saving the product Invalid input datetime format of value, also in the rule this message Something went wrong when saving the data of the rule. Please review the error log. |
Not fixed in 2.2.3. :( |
Fix for the issue is currently targeting release 2.2.4 |
So nothing to go in sale until you release 2.2.4. Is there a file file for this that can be implemented now? |
@sopedro this patch seems to have worked for me https://packagist.org/packages/lcbrq/magento2-dateformatpatch |
Hi! I tested @mmularski module on Magento 2.2.4, php 7.1.15, with locale en_GB and it doesn't work. Any idea? Regards, |
I'm getting the same issue on magento 2.2.4 when I switch to Portuguese language in Admin account... |
Also still seeing this issue in 2.2.4 when creating promotion cart rules using GB user and site settings. [2018-06-27 14:18:35] main.CRITICAL: Invalid input date format '27/06/+00201818' {"exception":"[object] (Exception(code: 0): Invalid input date format '27/06/+00201818' at /###/vendor/magento/framework/Stdlib/DateTime/Filter/Date.php:69)"} [] |
Has this been corrected in 2.2.5? |
Hi This issue seems to be fixed in 2.2.5. Please use the following commit as a reference: 010a646 More commits may be found with this search: https://github.com/magento/magento2/search?q=MAGETWO-71936&unscoped_q=MAGETWO-71936&type=Commits Thank you |
https://github.com/fernandofauth/magento2_datetime fix works for me i'm in 2.2.4 fr_FR thank's |
Issue still present in 2.2.6 running en_gb locale. php 7.1.18. Issue presents itself when creating product with special price to and from date (Exception(code: 0): Invalid input date format '23/10/+00201818'). Promotion rules the same issue. We implemented a fix to store date format for special price (product level) using the below recommended by another dev: private function convertSpecialFromDateStringToObject($productData)
comment the call to that function on line 162 This has fixed the issue for the product level but promo dates are still affected; they save after the above fix but the dates are being overridden with go today date so renders the promotional rule useless. I can see multiple threads, all which appear related to incorrect date format when using a non US locale and some suggest just switching the store locale to en_US to fix which seems impractical when our users are GB based. Has anyone in GB switched to local en_US with no store impact as we need to find a quick fix so we can prep our black friday deals? Anyone else on 2.2.6 with the same issue and a fix which is sitewide rather than just product level which we can use until this is patched / addressed thoroughly? |
Issue still present in 2.2.6 running en_gb locale for "Special From Date", but is correct for "Special To Date" Please reopen this issue |
I am having this same issue on Magento 2.3. Has anyone found a solution for this? |
I am having this same issue on Magento 2.3.1 ! |
@EmilyPepperman did you by chance find a solution? I've upgraded to 2.3.1 and am also experiencing the date format issue |
I am also having this issue after upgrading to 2.3.1 . I can not save modifications on special prices, as I get "Invalid input datetime format of value '5/08/2019'" error. |
Hello I found a solution online and This is how you fix it /hosting root/your sitre/vendor/magento/framework/Stdlib/DateTime/Timezone.php l hope that helps |
Preconditions
Steps to reproduce
Expected result
Actual result
Invalid input datetime format of value '25/07/+00201717'
appears and the product is not savedThis issue happened when I upgrade from 2.1.7 to 2.1.8. Some products seems to be able to save without an issue but majority of the ones I tried has this error with various values for the actual date.
The text was updated successfully, but these errors were encountered: