mirror of https://github.com/MISP/MISP
fix: [decaying:simulation] Make sure every sightings have a rounded
timestamppull/5032/head
parent
fbad1aaff3
commit
5322527c65
|
@ -449,10 +449,9 @@ class DecayingModel extends AppModel
|
||||||
$sightings = $this->Sighting->listSightings($user, $attribute_id, 'attribute', false, 0, false);
|
$sightings = $this->Sighting->listSightings($user, $attribute_id, 'attribute', false, 0, false);
|
||||||
if (empty($sightings)) {
|
if (empty($sightings)) {
|
||||||
$sightings = array(array('Sighting' => array('date_sighting' => $attribute['Attribute']['timestamp']))); // simulate a Sighting nonetheless
|
$sightings = array(array('Sighting' => array('date_sighting' => $attribute['Attribute']['timestamp']))); // simulate a Sighting nonetheless
|
||||||
} else {
|
}
|
||||||
foreach ($sightings as $i => $sighting) {
|
foreach ($sightings as $i => $sighting) {
|
||||||
$sightings[$i]['Sighting']['rounded_timestamp'] = $this->round_timestamp_to_hour($sighting['Sighting']['date_sighting']);
|
$sightings[$i]['Sighting']['rounded_timestamp'] = $this->round_timestamp_to_hour($sighting['Sighting']['date_sighting']);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// get start time
|
// get start time
|
||||||
$start_time = $attribute['Attribute']['timestamp'];
|
$start_time = $attribute['Attribute']['timestamp'];
|
||||||
|
|
Loading…
Reference in New Issue