Skip to content
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

Invalid report date #3122

Closed
kyrena opened this issue Mar 29, 2023 · 8 comments · Fixed by #3126
Closed

Invalid report date #3122

kyrena opened this issue Mar 29, 2023 · 8 comments · Fixed by #3126

Comments

@kyrena
Copy link
Contributor

kyrena commented Mar 29, 2023

Go to Reports > Sales > Invoiced, set Period to Month, set From to 01/01/2023 and To to 20/03/2023.

Result is something like that (1/1970):
image

Tested with OpenMage 19.5.0-rc2 and 20.1.0-rc2, with PHP 8.0.

@m-overlund
Copy link
Contributor

Tested on 19.4.23 and PHP 8.1 with no issues

@elidrissidev
Copy link
Member

Seems to be a regression in the latest RC releases.

@elidrissidev
Copy link
Member

elidrissidev commented Mar 30, 2023

This issue was introduced in #2827, the Zend_Date override in app/code/core/Zend had a few additional lines that made the date parsing work.

@fballiano
Copy link
Contributor

but #2861 seems to remove only Zend_Db related stuff no?

@elidrissidev
Copy link
Member

Yeah it was a different one, updated comment.

@sreichel
Copy link
Contributor

sreichel commented Apr 2, 2023

This issue was introduced in #2827, the Zend_Date override in app/code/core/Zend had a few additional lines that made the date parsing work.

Could you track it to a specific line?

@elidrissidev
Copy link
Member

Could you track it to a specific line?

Somewhere in these lines https://github.com/OpenMage/magento-lts/blob/v19.4.23/app/code/core/Zend/Date.php#L2080-2085

Either they were removed in zf1-future, or they were added by the magento team to support a specific usecase.

@sreichel
Copy link
Contributor

sreichel commented Apr 2, 2023

This has been added to Zend ... Shardj/zf1-future@c7a5cf6

                // (T)hh:mm
                if (empty($timematch)) {
                    preg_match('/[T,\s]{0,1}(\d{2}):(\d{2})/', $tmpdate, $timematch);
                }
                // (T)hhmm
                if (empty($timematch)) {
                    preg_match('/[T,\s]{0,1}(\d{2})(\d{2})/', $tmpdate, $timematch);
                }

(seems Magento used an oudated version of Zend_Date?!?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants