avatar jlarmstrong Pro Jan 29. 2009. 6:40 pm
I had my users complaining to me that the time reporting module wasn't adhering to todays date correctly after 5 or 6 pm EDT. I realized that this was caused by the GMT rollover so I made the change listed below at line 104 in "modules\timetracking\models\time_reports\TimeReport.class.php". What it looks like it really will do is translate any of the time reports to adhere to my users local time settings. Does anyone have any advice or feedback on this change?

//$today = new DateValue();
$today = new DateValue(time() + get_user_gmt_offset($this->logged_user));


avatar Ilija Studen Staff Jan 30. 2009. 12:23 am
To cover this issue, open AssignmentsFilter class and find prepareConditions method. Find:

$today = new DateValue();


and replace it with:

$today = new DateValue(time() + get_user_gmt_offset($user));


$logged_user is out of the scope in this method, but you can use $user variable. This issue will be covered with next bug fix release.
avatar Greg_TBone Feb 26. 2009. 6:17 pm
I believe the same issue is in the TimeReport.class.php file (/activecollab/application/modules/timetracking/models/time_reports/TimeReport.class.php). I make it to be line 104 that you need to change.

Just make the exact same change as Ilija mentioned above.

Edit: The way this affects things is that when viewing a time report for time entered Today, the correct GMT offset doesn't get applied, so for us in Sydney, Australia (GMT +10), I still see time from yesterday for most of the day...
T-Bone Productions, Sydney Based Professional Web Development - http://www.t-bone.com.au
avatar Ilija Studen Staff Feb 27. 2009. 3:00 am
Greg_TBone:
Edit: The way this affects things is that when viewing a time report for time entered Today, the correct GMT offset doesn't get applied, so for us in Sydney, Australia (GMT +10), I still see time from yesterday for most of the day...


This should not happen. Can you check the query in /logs (activeCollab keeps execution log when debugging is turned on)?