Fix broken Unix timestamp formatting

This commit is contained in:
Alex Cabal 2024-06-25 10:51:48 -05:00
parent d1901970a5
commit 6af2717773
3 changed files with 4 additions and 4 deletions

View file

@ -60,7 +60,7 @@ try{
// Increment local download count, expires in 2 weeks
$downloadCount++;
setcookie('download-count', (string)$downloadCount, ['expires' => (new DateTimeImmutable('+2 week'))->format('@'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']);
setcookie('download-count', (string)$downloadCount, ['expires' => (new DateTimeImmutable('+2 week'))->format('U'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']);
}
catch(Exceptions\InvalidFileException | Exceptions\EbookNotFoundException){
Template::Emit404();