<?php

namespace App\Traits;

use DateTimeInterface;

trait LocalTimeSerialize
{
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date
            ->timezone(config('app.timezone'))
            ->format('Y-m-d H:i:s');
    }
}
