mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 10:31:59 -04:00
Remove last traces of date functions in favor of DateTimeImmutable
This commit is contained in:
parent
c6d2d77537
commit
97821d0dc3
4 changed files with 7 additions and 13 deletions
|
@ -2,8 +2,6 @@
|
|||
use Ramsey\Uuid\Uuid;
|
||||
use Safe\DateTimeImmutable;
|
||||
|
||||
use function Safe\strtotime;
|
||||
|
||||
/**
|
||||
* @property User $User
|
||||
* @property string $Url
|
||||
|
@ -100,7 +98,7 @@ class Session{
|
|||
}
|
||||
|
||||
public static function SetSessionCookie(string $sessionId): void{
|
||||
setcookie('sessionid', $sessionId, ['expires' => strtotime('+1 week'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']); // Expires in two weeks
|
||||
setcookie('sessionid', $sessionId, ['expires' => (new DateTimeImmutable('+1 week'))->format('@'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']); // Expires in two weeks
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue