mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Add DateTimeFormat enum
This commit is contained in:
parent
be5574eaec
commit
c35c47b793
18 changed files with 38 additions and 26 deletions
|
@ -52,7 +52,7 @@ try{
|
|||
|
||||
// Increment local download count, expires in 2 weeks
|
||||
$downloadCount++;
|
||||
setcookie('download-count', (string)$downloadCount, ['expires' => intval((new DateTimeImmutable('+2 week'))->format('U')), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']);
|
||||
setcookie('download-count', (string)$downloadCount, ['expires' => intval((new DateTimeImmutable('+2 week'))->format(Enums\DateTimeFormat::UnixTimestamp->value)), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']);
|
||||
}
|
||||
catch(Exceptions\InvalidFileException | Exceptions\EbookNotFoundException){
|
||||
Template::Emit404();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue