浏览代码

It is good to set the application's timezone.

Ferks-FK 2 年之前
父节点
当前提交
bad9d0ec12
共有 1 个文件被更改,包括 1 次插入1 次删除
  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');
             }
         }