mardi 21 août 2018

When deleting Laravel model object, updated_at does not follow UTC. Laravel 5.5

When I delete a Laravel model object, the deleted_At follows UTC, however, updated_at follow my local machine time.

This is the code that does the deletion.

public function delete( $eventId ) {
    $event = $this->myEvent( $eventId );
    if ( $event->source ) {
        $event->source->forceDelete();
    }

    return $event->delete();
}

This is from app.php:

'timezone'        => 'UTC',

This is when I run date on server:

Tue Aug 21 04:48:42 UTC 2018

When I run: SELECT @@global.time_zone, @@session.time_zone; on the DB it says: UTC.

How can I make updated_at follow UTC?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire