-
diff --git a/application/Timerecording/TimerecordingController.php b/application/Timerecording/TimerecordingController.php
index f5d6d14aa..8af4fe440 100644
--- a/application/Timerecording/TimerecordingController.php
+++ b/application/Timerecording/TimerecordingController.php
@@ -666,8 +666,12 @@ class TimerecordingController extends mfBaseController
$timestamp = $timestamp_montag;
for ($i = 1; $i <= 7; $i++) {
- $dDate = date('Y-m-d', $timestamp);
- $dDay = date('w', $timestamp);
+ $WintertimeCompensation = 0;
+ if (date('I', $timestamp) == 0) {
+ $WintertimeCompensation = 3600;
+ }
+ $dDate = date('Y-m-d', $timestamp + $WintertimeCompensation);
+ $dDay = date('w', $timestamp + $WintertimeCompensation);
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate) && $dDate <= date('Y-m-d', $enddate)) {
$mustSeconds = $mustSeconds + $workingHours[$dDay];
} elseif ($holiDay[$dDate]) {
@@ -685,8 +689,12 @@ class TimerecordingController extends mfBaseController
$timestamp = $firstdate;
for ($i = 1; $i <= $daycount; $i++) {
- $dDate = date('Y-m-d', $timestamp);
- $dDay = date('w', $timestamp);
+ $WintertimeCompensation = 0;
+ if (date('I', $timestamp) == 0) {
+ $WintertimeCompensation = 3600;
+ }
+ $dDate = date('Y-m-d', $timestamp + $WintertimeCompensation);
+ $dDay = date('w', $timestamp + $WintertimeCompensation);
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate) && $dDate <= date('Y-m-d', $enddate)) {
$mustSeconds = $mustSeconds + $workingHours[$dDay];
} elseif ($holiDay[$dDate]) {
@@ -703,8 +711,12 @@ class TimerecordingController extends mfBaseController
$timestamp = $firstdate;
for ($i = 1; $i <= 366; $i++) {
- $dDate = date('Y-m-d', $timestamp);
- $dDay = date('w', $timestamp);
+ $WintertimeCompensation = 0;
+ if (date('I', $timestamp) == 0) {
+ $WintertimeCompensation = 3600;
+ }
+ $dDate = date('Y-m-d', $timestamp + $WintertimeCompensation);
+ $dDay = date('w', $timestamp + $WintertimeCompensation);
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate) && $dDate <= date('Y-m-d', $enddate)) {
$mustSeconds = $mustSeconds + $workingHours[$dDay];
} elseif ($holiDay[$dDate]) {
@@ -722,8 +734,12 @@ class TimerecordingController extends mfBaseController
$timestamp = $firstdate;
for ($i = 1; $i <= $daycount; $i++) {
- $dDate = date('Y-m-d', $timestamp);
- $dDay = date('w', $timestamp);
+ $WintertimeCompensation = 0;
+ if (date('I', $timestamp) == 0) {
+ $WintertimeCompensation = 3600;
+ }
+ $dDate = date('Y-m-d', $timestamp + $WintertimeCompensation);
+ $dDay = date('w', $timestamp + $WintertimeCompensation);
if (!$holiDay[$dDate]) {
$mustSeconds = $mustSeconds + $workingHours[$dDay];
}
@@ -1034,8 +1050,12 @@ class TimerecordingController extends mfBaseController
$update = false;
$timestamp = $timestamp_montag;
for ($i = 1; $i <= 7; $i++) {
- $dDate = date('Y-m-d', $timestamp);
- $dDay = date('w', $timestamp);
+ $WintertimeCompensation = 0;
+ if (date('I', $timestamp) == 0) {
+ $WintertimeCompensation = 3600;
+ }
+ $dDate = date('Y-m-d', $timestamp + $WintertimeCompensation);
+ $dDay = date('w', $timestamp + $WintertimeCompensation);
if (!$holiDay[$dDate]) {
if ($workingHours[$dDay]) {
foreach ($workingHours[$dDay] as $workingHour) {
diff --git a/application/TimerecordingReport/TimerecordingReportController.php b/application/TimerecordingReport/TimerecordingReportController.php
index 284ea8750..89007e985 100644
--- a/application/TimerecordingReport/TimerecordingReportController.php
+++ b/application/TimerecordingReport/TimerecordingReportController.php
@@ -537,8 +537,12 @@ class TimerecordingReportController extends mfBaseController
$timestamp = $timestamp_montag;
for ($i = 1; $i <= 7; $i++) {
- $dDate = date('Y-m-d', $timestamp);
- $dDay = date('w', $timestamp);
+ $WintertimeCompensation = 0;
+ if (date('I', $timestamp) == 0) {
+ $WintertimeCompensation = 3600;
+ }
+ $dDate = date('Y-m-d', $timestamp + $WintertimeCompensation);
+ $dDay = date('w', $timestamp + $WintertimeCompensation);
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate) && $dDate <= date('Y-m-d', $enddate)) {
$mustSeconds = $mustSeconds + $workingHours[$dDay];
@@ -559,8 +563,12 @@ class TimerecordingReportController extends mfBaseController
$timestamp = $firstdate;
for ($i = 1; $i <= $daycount; $i++) {
- $dDate = date('Y-m-d', $timestamp);
- $dDay = date('w', $timestamp);
+ $WintertimeCompensation = 0;
+ if (date('I', $timestamp) == 0) {
+ $WintertimeCompensation = 3600;
+ }
+ $dDate = date('Y-m-d', $timestamp + $WintertimeCompensation);
+ $dDay = date('w', $timestamp + $WintertimeCompensation);
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate) && $dDate <= date('Y-m-d', $enddate)) {
$mustSeconds = $mustSeconds + $workingHours[$dDay];
}
@@ -578,8 +586,12 @@ class TimerecordingReportController extends mfBaseController
$timestamp = $firstdate;
for ($i = 1; $i <= $daycount; $i++) {
- $dDate = date('Y-m-d', $timestamp);
- $dDay = date('w', $timestamp);
+ $WintertimeCompensation = 0;
+ if (date('I', $timestamp) == 0) {
+ $WintertimeCompensation = 3600;
+ }
+ $dDate = date('Y-m-d', $timestamp + $WintertimeCompensation);
+ $dDay = date('w', $timestamp + $WintertimeCompensation);
if (!$holiDay[$dDate]) {
$mustSeconds = $mustSeconds + $workingHours[$dDay];
}
@@ -688,7 +700,7 @@ class TimerecordingReportController extends mfBaseController
} else if ($timerecording->timerecordingCategory->hourday == 2 || ($timerecording->timerecordingCategory->hourday == 3 && $timerecording->end)) {
$date = date("d.m.", $timerecording->start) . " - " . $daysgerm[date("w", $timerecording->end)] . " " . date("d.m.Y", $timerecording->end);
$datadate = date("Y-m-d", $timerecording->start);
- $enddate = date("Y-m-d", $timerecording->end);
+ $enddate = date("Y-m-d", $timerecording->end + 7200);
$start = "-";
$end = "-";
$day = $daysgerm[date("w", $timerecording->start)];