This is all done with Laravel, and it looks something like this:
public function saveTask() {
$task = Task::create([
//other stuff
'deadline' => '2017-02-13 11:00:00'
]);
}
There is a field called published, and is by default 0. When I create task, all works fine. But when I call the publish method to publish task, it goes crazy and backdates to today's date.
public function publishTask($id) {
$task = Task::find($id);
$task->published = 1;
$task->save();
return redirect()->back();
}
At this point, as soon as I call the publishTask method, on page refresh, database entry for deadline changes to today's date, and the task is published.
That's all I got. Okay, gladly welcoming any ideas. Thanks y'allz for your time