Fix missed StartTime to StartDateTime

This commit is contained in:
Isaac Connor
2020-11-04 18:20:59 -05:00
parent 018abe39c2
commit d37bce4e0e
2 changed files with 4 additions and 4 deletions

View File

@@ -89,11 +89,11 @@ class ImageComponent extends Component {
}
// Take the StartTime of an Event and return
// Take the StartDateTime of an Event and return
// the path to its location on the filesystem
public function getEventPath( $event ) {
if ( $config['ZM_USE_DEEP_STORAGE'] == 1 )
return $event['Event']['MonitorId'].'/'.strftime( "%y/%m/%d/%H/%M/%S", strtotime($event['Event']['StartTime']) );
return $event['Event']['MonitorId'].'/'.strftime( '%y/%m/%d/%H/%M/%S', strtotime($event['Event']['StartDateTime']) );
else
return $event['Event']['MonitorId'].'/'.$event['Event']['Id'];
}

View File

@@ -65,7 +65,7 @@ class EventsController extends AppController {
// API
'limit' => '100',
'order' => array('StartTime'),
'order' => array('StartDateTime'),
'paramType' => 'querystring',
);
if ( isset($conditions['GroupId']) ) {
@@ -309,7 +309,7 @@ class EventsController extends AppController {
} else {
$conditions = array();
}
array_push($conditions, array("StartTime >= DATE_SUB(NOW(), INTERVAL $expr $unit)"));
array_push($conditions, array("StartDateTime >= DATE_SUB(NOW(), INTERVAL $expr $unit)"));
$query = $this->Event->find('all', array(
'fields' => array(
'MonitorId',