date_create

Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8
Alias DateTime::__construct
<?php         $response->headers->set('Content-Length', $cache->getSize($path));

        $response->setPublic();

        $response->setMaxAge(31536000);

        $response->setExpires(date_create()->modify('+1 years'));



        if ($this->request) {

            $response->setLastModified(date_create()->setTimestamp($cache->getTimestamp($path)));
<?php         $response->setExpires(date_create()->modify('+1 years'));



        if ($this->request) {

            $response->setLastModified(date_create()->setTimestamp($cache->getTimestamp($path)));

            $response->isNotModified($this->request);

        }