mirror of https://gitee.com/karson/fastadmin.git
Pre Merge pull request !443 from 小和/N/A
commit
5193f50aa0
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue