From 196a8bc151929a033d9dd5f1888196b61ce5d0ba Mon Sep 17 00:00:00 2001 From: lithromantic <4804253-lithromantic@users.noreply.gitlab.com> Date: Sun, 22 Mar 2020 07:57:40 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=8D=E7=BD=AE=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E6=9C=80=E5=90=8E=E4=B8=80=E5=A4=A9=E7=9A=84=E4=B8=8B?= =?UTF-8?q?=E6=AC=A1=E9=87=8D=E7=BD=AE=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Bought.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Bought.php b/app/Models/Bought.php index cba7b9d1..4856fbd0 100644 --- a/app/Models/Bought.php +++ b/app/Models/Bought.php @@ -39,7 +39,7 @@ class Bought extends Model */ public function used_days() { - return (int) ((time() - $this->datetime) / 86400); + return (int) ((strtotime(date('Y-m-d')) - $this->datetime) / 86400); } /*