Page 1 of 1

Hesk 2.6.5 Run Report Time Zone Bug

Posted: Sat Sep 12, 2015 3:06 am
by shobzz87
There is a Bug in "Run Report".

I am using hesk in NZ , My server time zone is US .
after increasing 17 Hours in hesk settings. New ticket goes to latest date eg 12 Sep right time.
But if you will "Run Reports" it will show into 11 Sep according to server US time Zone.

In other words, Ticket entered on 12 Sep will show in 11 Sep in Run Reports.

Friday, September 11, 2015 1 1 0 16:00:09

How to fix that??

Re: Hesk 2.6.5 Run Report Time Zone Bug

Posted: Sat Sep 12, 2015 5:06 am
by mkoch227
I can reproduce this issue as well in a clean installation of HESK. The following workaround worked for me:

1. Open admin/reports.php
2. Find, around line 881:

Code: Select all

<td><?php echo hesk_dateToString($k); ?></td>
3. Replace that line with:

Code: Select all

<td><?php echo hesk_dateToString($k, 1, 0, 0, true); ?></td>

Re: Hesk 2.6.5 Run Report Time Zone Bug

Posted: Sat Sep 12, 2015 8:37 pm
by shobzz87
I have modified the line 953 on server . But no change.
after entering a job today on 13 sep, it still going to 12 sep report.

Re: Hesk 2.6.5 Run Report Time Zone Bug

Posted: Mon Sep 14, 2015 1:26 pm
by Klemen
I can confirm this is happening. This will probably require code rewrite to use MySQL CONVERT_TZ function to query dates.

I will see if I can come up with a solution that doesn't complicate the queries too much for the next update.