Skip to content

Commit 029315d

Browse files
committed
fix: data types matter folks...
This fixes an issue where we compare floats to 0 (int) but technically floats need to be compared to 0.0. In this case we don't particularly care the about the float itself we just need to figure out if there is an offset worth dealing with. casting to int is just fine.
1 parent 698820b commit 029315d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Domain/Timesheets/Services/Timesheets.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function getWeeklyTimesheets(int $projectId, CarbonInterface $fromDate, i
305305
}
306306
// Detect timezone offset
307307

308-
$workdateOffsetStart = ($currentWorkDate->setToUserTimezone()->secondsSinceMidnight() / 60 / 60);
308+
$workdateOffsetStart = (int) ($currentWorkDate->setToUserTimezone()->secondsSinceMidnight() / 60 / 60);
309309

310310
// Various Entries can be in different timezones and thus would not be caught by upsert or grouping by
311311
// default Creating new rows for each timezone adjustment

0 commit comments

Comments
 (0)