Explorar o código

It is good to set the application's timezone.

Ferks-FK %!s(int64=2) %!d(string=hai) anos
pai
achega
bad9d0ec12
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Models/Coupon.php

+ 1 - 1
app/Models/Coupon.php

@@ -54,7 +54,7 @@ class Coupon extends Model
         }
 
         if (!is_null($this->expires_at)) {
-            if ($this->expires_at <= Carbon::now()->timestamp) {
+            if ($this->expires_at <= Carbon::now(config('app.timezone'))->timestamp) {
                 return __('EXPIRED');
             }
         }