mirror of https://github.com/MISP/MISP
Fix broken timestamps by using 24 hour clock and ISO 8601 date format
The event view shows a wrong "Last change", e.g. "2018/08/23 06:01:45" for "2018/08/23 18:01:45". The same problem affects the timestamp in the XML generated by IOCExportTool.php. Fix by correcting the PHP date() code "h" to "H". While here, also switch to a clearer ISO 8601 date representation for "Last change", using dashes instead of slashes for separation of year, month and day.pull/3587/head
parent
113fa25471
commit
b19e405b32
|
@ -55,7 +55,7 @@ class IOCExportTool
|
||||||
{
|
{
|
||||||
$temp = '';
|
$temp = '';
|
||||||
// We will start adding all the components that will be in the xml file here
|
// We will start adding all the components that will be in the xml file here
|
||||||
$date = date("Y-m-d\Th:i:s");
|
$date = date("Y-m-d\TH:i:s");
|
||||||
$temp .= '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL;
|
$temp .= '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL;
|
||||||
$temp .= '<ioc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="' . CakeText::uuid() . '" last-modified="' . $date . '" xmlns="http://schemas.mandiant.com/2010/ioc">' . PHP_EOL;
|
$temp .= '<ioc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="' . CakeText::uuid() . '" last-modified="' . $date . '" xmlns="http://schemas.mandiant.com/2010/ioc">' . PHP_EOL;
|
||||||
$temp .= ' <short_description>Filtered indicator list</short_description>' . PHP_EOL;
|
$temp .= ' <short_description>Filtered indicator list</short_description>' . PHP_EOL;
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
<dd><?php echo h($attribute_count);?></dd>
|
<dd><?php echo h($attribute_count);?></dd>
|
||||||
<dt><?php echo __('Last change');?></dt>
|
<dt><?php echo __('Last change');?></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<?php echo date('Y/m/d h:i:s', $event['Event']['timestamp']);; ?>
|
<?php echo date('Y-m-d H:i:s', $event['Event']['timestamp']);; ?>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><?php echo __('Extends');?></dt>
|
<dt><?php echo __('Extends');?></dt>
|
||||||
|
|
Loading…
Reference in New Issue