Skip to content

Commit 5212893

Browse files
committed
#560 // Fixed storage date in Sqlite
1 parent a501a28 commit 5212893

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/phpFastCache/Drivers/Sqlite/Driver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ protected function driverWrite(CacheItemInterface $item)
275275
$stm->execute([
276276
':keyword' => $item->getKey(),
277277
':object' => $this->encode($this->driverPreWrap($item)),
278-
':exp' => time() + $item->getTtl(),
278+
':exp' => $item->getExpirationDate()->getTimestamp(),
279279
]);
280280

281281
return true;
@@ -286,7 +286,7 @@ protected function driverWrite(CacheItemInterface $item)
286286
$stm->execute([
287287
':keyword' => $item->getKey(),
288288
':object' => $this->encode($this->driverPreWrap($item)),
289-
':exp' => time() + $item->getTtl(),
289+
':exp' => $item->getExpirationDate()->getTimestamp(),
290290
]);
291291
} catch (PDOException $e) {
292292
return false;

0 commit comments

Comments
 (0)