diff --git a/extend/fast/Date.php b/extend/fast/Date.php index ce018f1b1932e168158c19d228c08d5670b26cd7..69be62f12c152b713dc58e9a7eef49f41fae6d48 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);