* Replace zero date to null.

This commit is contained in:
dingguodong
2023-08-07 16:01:25 +08:00
parent f41c427ea4
commit df8e501de9
+3 -3
View File
@@ -149,7 +149,7 @@ class cronModel extends model
public function getLastTime()
{
$cron = $this->dao->select('*')->from(TABLE_CRON)->orderBy('lastTime desc')->limit(1)->fetch();
return isset($cron->lastTime) ? $cron->lastTime : '0000-00-00 00:00:00';
return isset($cron->lastTime) ? $cron->lastTime : null;
}
/**
@@ -192,7 +192,7 @@ class cronModel extends model
{
$cron = fixer::input('post')
->add('status', 'normal')
->add('lastTime', '0000-00-00 00:00:00')
->add('lastTime', null)
->skipSpecial('m,h,dom,mon,dow,command')
->get();
@@ -224,7 +224,7 @@ class cronModel extends model
public function update($cronID)
{
$cron = fixer::input('post')
->add('lastTime', '0000-00-00 00:00:00')
->add('lastTime', null)
->skipSpecial('m,h,dom,mon,dow,command')
->get();