-
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
Reports and date format #7037
Comments
Hi @pitangaweb , thanks for report |
I've the same issue, attached is the error |
Is there an update on this, did anyone find a resolution? |
Why has this been closed? I'm experiencing this issue in Magento 2.1.2, can this be fixed as soon as possible please. |
I'd hoped this would be fixed in 2.1.3. Is there an ETA on when this can be fixed or possibly a hot fix? |
Any update on this ? The whole Reports section is broken. |
At this stage, I'm crying out for a solution! |
it's the bug that keeps on giving: |
this wasn't fixed in the last M2.1.4, I'm losing the will to live! |
Any idea when this will be fixed? Hoping 2.1.5? |
For users with locale set to EN_GB this is still an issue ALL reports fail in the backend. This needs fixing asap as we are having to run reports in other ways and they are inefficient. On 2.1.4 |
Does anyone have a quick fix for this? |
anyone know of a fix? |
Not a permanent fix, but if you change the date order once selected to mm/dd/yyyy the reports run fine. |
@AlexanderBMAS unfortunately my client won't go for that type of work around |
anyone got solution? |
I reported this issue back in September last year, I wasn't the first. I hope I'm wrong but it would seem that Magento have no plans that I know to fix this. |
Quick fix: 'date_format' => $dateFormat, to 'date_format' => 'mm/dd/Y', |
@sheldmandu @pitangaweb |
For reports the workaround works but for birthdate no. |
@sopedro post your error here |
"invalid Date" in backend |
@sopedro which admin interface you are using? /vendor/magento/module-reports/Block/Adminhtml/Filter/Form.php 'date_format' => $dateFormat, to 'date_format' => 'mm/dd/Y', |
I'm using portuguese admin interface. |
@sopedro It actually solves the problem, I have tested. The problem occurs when you choose the language for the user of the Admin Panel. Idiom locale that have the format dd-mm-Y have a problem because the Zend Class it expects mm-dd-Y. |
I solved the problem by overwriting the class, creating a separate module and injecting as "prefer" from the Magento Class to the Class I created by overwriting as needed. Anyone who wants to use the solution is available on Github: |
Im having this same issue that the datepicker on sales > orders enters the date in UK format (correct for me). But this stops reports working. The date can be entererred manually to fix the issue. Then I realised that a different ADMIN USER does not have the same issue. I dont know why but on the same computer and browser one user works, the others do not. I hope this helps fix the issue |
In 2.1.1 we were able to fix the problem by updating the interface_locale back to en_US for all affected admin users.
Clearly not a permanent solution, but better then the error. |
The bug is client side because on server side all date format are correct. The only way to work smoothly is to set up the administrator user's locale in a language that uses mm / dd / yyyy format as an English language. |
@pitangaweb, thank you for your report. |
Preconditions
Steps to reproduce
Expected result
Actual result
Invalid input date format '16/10/2016'";i:1;s:6482:"#0 /PATH-T)-MAGENTO2/vendor/magento/zendframework1/library/Zend/Filter.php(114): Magento\Framework\Stdlib\DateTime\Filter\Date->filter('16/10/2016')
Looks like an error on the date format where day and month are inverted.
The text was updated successfully, but these errors were encountered: