From e90d619d5ba4766bab1caca68732a41f680237cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=92=8C?= <496631085@qq.com> Date: Tue, 23 May 2023 06:24:21 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=A0=E5=80=BC=E4=B8=BAnu?= =?UTF-8?q?ll=E5=92=8C=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=95=B4=E6=95=B0?= =?UTF-8?q?=E6=97=B6=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 小和 <496631085@qq.com> --- extend/fast/Date.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extend/fast/Date.php b/extend/fast/Date.php index ce018f1b..69be62f1 100644 --- a/extend/fast/Date.php +++ b/extend/fast/Date.php @@ -164,11 +164,11 @@ class Date */ public static function unixtime($type = 'day', $offset = 0, $position = 'begin', $year = null, $month = null, $day = null, $hour = null, $minute = null) { - $year = is_null($year) ? date('Y') : $year; - $month = is_null($month) ? date('m') : $month; - $day = is_null($day) ? date('d') : $day; - $hour = is_null($hour) ? date('H') : $hour; - $minute = is_null($minute) ? date('i') : $minute; + $year = is_null($year) ? (int)date('Y') : (int)$year; + $month = is_null($month) ? (int)date('m') : (int)$month; + $day = is_null($day) ? (int)date('d') : (int)$day; + $hour = is_null($hour) ? (int)date('H') : (int)$hour; + $minute = is_null($minute) ? (int)date('i') : (int)$minute; $position = in_array($position, array('begin', 'start', 'first', 'front')); $baseTime = mktime(0, 0, 0, $month, $day, $year); -- Gitee