diff --git a/app/Service/Import/Importers/ClockifyTimeEntriesImporter.php b/app/Service/Import/Importers/ClockifyTimeEntriesImporter.php index c2fc256f..3be945e9 100644 --- a/app/Service/Import/Importers/ClockifyTimeEntriesImporter.php +++ b/app/Service/Import/Importers/ClockifyTimeEntriesImporter.php @@ -121,7 +121,7 @@ class ClockifyTimeEntriesImporter extends DefaultImporter if ($start === null) { throw new ImportException('Start date ("'.$record['Start Date'].'") or time ("'.$record['Start Time'].'") are invalid'); } - $timeEntry->start = $start; + $timeEntry->start = $start->utc(); // End try { @@ -136,7 +136,7 @@ class ClockifyTimeEntriesImporter extends DefaultImporter if ($end === null) { throw new ImportException('End date ("'.$record['End Date'].'") or time ("'.$record['End Time'].'") are invalid'); } - $timeEntry->end = $end; + $timeEntry->end = $end->utc(); $timeEntry->setComputedAttributeValue('billable_rate'); $timeEntry->save(); $this->timeEntriesCreated++; diff --git a/app/Service/Import/Importers/TogglTimeEntriesImporter.php b/app/Service/Import/Importers/TogglTimeEntriesImporter.php index 859dde45..c5d6a7cf 100644 --- a/app/Service/Import/Importers/TogglTimeEntriesImporter.php +++ b/app/Service/Import/Importers/TogglTimeEntriesImporter.php @@ -112,7 +112,7 @@ class TogglTimeEntriesImporter extends DefaultImporter if ($start === null) { throw new ImportException('Start date ("'.$record['Start date'].'") or time ("'.$record['Start time'].'") are invalid'); } - $timeEntry->start = $start; + $timeEntry->start = $start->utc(); try { $end = Carbon::createFromFormat('Y-m-d H:i:s', $record['End date'].' '.$record['End time'], $timezone); @@ -122,7 +122,7 @@ class TogglTimeEntriesImporter extends DefaultImporter if ($end === null) { throw new ImportException('End date ("'.$record['End date'].'") or time ("'.$record['End time'].'") are invalid'); } - $timeEntry->end = $end; + $timeEntry->end = $end->utc(); $timeEntry->setComputedAttributeValue('billable_rate'); $timeEntry->save(); $this->timeEntriesCreated++;