Browse Source

Fix date instance

pull/3/head
Wahyu Ramadhan 1 year ago
parent
commit
4b667994bb
  1. 2
      app/Http/Controllers/ActivityController.php

2
app/Http/Controllers/ActivityController.php

@ -399,7 +399,7 @@ class ActivityController extends Controller
}
$projectStart = Project::select('mulai_proyek')->where('id', $projectId)->first();
foreach ($data['activities'] as $i => $activity_row) {
$startDate = \DateTime::createFromFormat('Y-m-d H:i:s.uP', $projectStart->mulai_proyek);
$startDate = new \DateTime($projectStart->mulai_proyek);
$endDate = clone $startDate;
$endDate->modify('-1 day');
$daysRemaining = $activity_row['duration'];

Loading…
Cancel
Save