public function updateTimestamps()
    {
        // Create a datetime with microseconds
        $dateTime = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)));
        $dateTime->setTimezone(new \DateTimeZone(date_default_timezone_get()));

        if (null === $this->createdAt) {
            $this->createdAt = $dateTime;
        }

        $this->updatedAt = $dateTime;
    }
public function updateTimestamps()
    {
        // Create a datetime with microseconds
        $dateTime = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)));
        $dateTime->setTimezone(new \DateTimeZone(date_default_timezone_get()));

        if (null === $this->createdAt) {
            $this->createdAt = $dateTime;
        }

        $this->updatedAt = $dateTime;
    }
public function updateTimestamps ( ) { // Create a datetime with microseconds $ dateTime = \ DateTime :: createFromFormat ( 'U.u' , sprintf ( '%.6F' , microtime ( true ) ) ) ; $ dateTime -> setTimezone ( new \ DateTimeZone ( date_default_timezone_get ( ) ) ) ; if ( null === $ this -> createdAt ) { $ this -> createdAt = $ dateTime ; } $ this -> updatedAt = $ dateTime ; }
Updates createdAt and updatedAt timestamps.
Updates createdAt and updatedAt timestamps .