Skip to content

Commit a1fddf6

Browse files
committed
Updated method of creating new DateTime to work with the clockmock (#55)
1 parent 102efa3 commit a1fddf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CacheItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function expiresAfter($time)
154154
}
155155

156156
if (is_int($time)) {
157-
$this->expirationDate = new \DateTime(sprintf('+%sseconds', $time));
157+
$this->expirationDate = \DateTime::createFromFormat('U', time() + $time);
158158
}
159159

160160
return $this;

0 commit comments

Comments
 (0)