From b19e405b32e56e7e508a1fe09482c54a50ae4533 Mon Sep 17 00:00:00 2001 From: Daniel Roethlisberger Date: Thu, 23 Aug 2018 18:35:21 +0200 Subject: [PATCH] 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. --- app/Lib/Tools/IOCExportTool.php | 2 +- app/View/Events/view.ctp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Lib/Tools/IOCExportTool.php b/app/Lib/Tools/IOCExportTool.php index 024dafab0..382438a91 100644 --- a/app/Lib/Tools/IOCExportTool.php +++ b/app/Lib/Tools/IOCExportTool.php @@ -55,7 +55,7 @@ class IOCExportTool { $temp = ''; // 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 .= '' . PHP_EOL; $temp .= '' . PHP_EOL; $temp .= ' Filtered indicator list' . PHP_EOL; diff --git a/app/View/Events/view.ctp b/app/View/Events/view.ctp index e0bbdf150..0232e6f4f 100644 --- a/app/View/Events/view.ctp +++ b/app/View/Events/view.ctp @@ -170,7 +170,7 @@
- +