From 08073440c0f7675decf0bfb617784441205c33c3 Mon Sep 17 00:00:00 2001 From: Volodya Kurshudyan <70023120+xurshudyan@users.noreply.github.com> Date: Sat, 6 Jan 2024 23:14:05 +0400 Subject: [PATCH] Refactor time handling using InteractsWithTime trait (#49601) --- src/Illuminate/Cache/DynamoDbStore.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Cache/DynamoDbStore.php b/src/Illuminate/Cache/DynamoDbStore.php index 73aef8d612cf..b9c6fde5f2c6 100644 --- a/src/Illuminate/Cache/DynamoDbStore.php +++ b/src/Illuminate/Cache/DynamoDbStore.php @@ -285,7 +285,7 @@ public function add($key, $value, $seconds) ], 'ExpressionAttributeValues' => [ ':now' => [ - 'N' => (string) Carbon::now()->getTimestamp(), + 'N' => (string) $this->currentTime(), ], ], ]); @@ -326,7 +326,7 @@ public function increment($key, $value = 1) ], 'ExpressionAttributeValues' => [ ':now' => [ - 'N' => (string) Carbon::now()->getTimestamp(), + 'N' => (string) $this->currentTime(), ], ':amount' => [ 'N' => (string) $value, @@ -371,7 +371,7 @@ public function decrement($key, $value = 1) ], 'ExpressionAttributeValues' => [ ':now' => [ - 'N' => (string) Carbon::now()->getTimestamp(), + 'N' => (string) $this->currentTime(), ], ':amount' => [ 'N' => (string) $value, @@ -469,7 +469,7 @@ protected function toTimestamp($seconds) { return $seconds > 0 ? $this->availableAt($seconds) - : Carbon::now()->getTimestamp(); + : $this->currentTime(); } /**