Filter by FROM date TO date issue

Post Reply
Eddy
Posts: 121
Joined: 28 Dec 2017, 03:38
Name: Eduardo
Location: UK

Filter by FROM date TO date issue

Post by Eddy »

Hi Sergey,

You asked to report back on this issue once 2.6 beta was released. The original post is here:

viewtopic.php?f=2&t=1640

Also, I am adding a simple setup database showing the issue. Use admin / admin to login and the "Start of year" filter under Projects to reproduce the issue.

Please let me know if I can provide more information.
Attachments
5_2020-01-05_19-12.sql.zip
(11.28 KiB) Downloaded 95 times
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Filter by FROM date TO date issue

Post by support »

Finally I have found issue. File from archive replace to includes\classes\reports\
Let me know if it works ok.

The issue was with myslq function FROM_UNIXTIME which returns -1 hour difference then PHP with the same timezone. And that is why filters was not correct.

I have updated code so now it should works ok.

MySQL query

Code: Select all

[FROM_UNIXTIME(1561935600,'%Y-%m-%d %h:%i')] => 2019-06-30 11:00
PHP:

Code: Select all

date('Y-m-d h:i',1561935600); => 2019-07-01 12:00
Attachments
reports.zip
(8.35 KiB) Downloaded 101 times
Eddy
Posts: 121
Joined: 28 Dec 2017, 03:38
Name: Eduardo
Location: UK

Re: Filter by FROM date TO date issue

Post by Eddy »

Hi Sergey,

Thank you for the bug fix. I tried it on both 2.6 and 2.5.2 and it is now working okay.
Post Reply