if I Add a goal with 40h / week and then add a record: Monday 09:00 - 17:00, then this record is not counted for that goal.
Adding a record: 11:00 - 19:00 is counted as 8h for that goal.
This patch fixes the issue for me:
diff --git a/lib/Controller/AjaxController.php b/lib/Controller/AjaxController.php
index ef8c9e8..9b767cb 100644
--- a/lib/Controller/AjaxController.php
+++ b/lib/Controller/AjaxController.php
@@ -1176,7 +1176,8 @@ class AjaxController extends Controller {
$year = $date->format("Y");
$weekstartdt = new \DateTime();
$weekstartdt->setISODate($year, $weeknumber);
-
+ $hours = 11;
+ $weekstartdt->sub(new \DateInterval("PT{$hours}H"));
return $weekstartdt;
}
public function getStartOfMonth($timestamp){
seems like returned timestamp from a DateTime object which is configured by setISODate() is not set to 00:00 of that day. So weeks start at Monday 11:00 in my case (but I#m not sure if this is TimeZone related).
Yes, all the reporting done server side is in UTC. Individual times are converted in local timezone by the clients depending on their individual location (or timezone settings).
if I Add a goal with 40h / week and then add a record: Monday 09:00 - 17:00, then this record is not counted for that goal. Adding a record: 11:00 - 19:00 is counted as 8h for that goal.
This patch fixes the issue for me:
seems like returned timestamp from a DateTime object which is configured by setISODate() is not set to 00:00 of that day. So weeks start at Monday 11:00 in my case (but I#m not sure if this is TimeZone related).