From dba8e78dc86e60a78833b47e60f93eb12e931048 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 23 Sep 2015 17:59:39 +0200 Subject: [PATCH 1/2] reformat datetime for timeline --- views/bootstrap/class.Bootstrap.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index efb649614..8de279bce 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2033,8 +2033,12 @@ mayscript> $classname = $item['type']."_".$item['status']; else $classname = $item['type']; - if(!$skip || !in_array($classname, $skip)) - echo "{'start': new Date('".$item['date']."'), 'content': '".$item['msg']."', 'className': '".$classname."'},\n"; + if(!$skip || !in_array($classname, $skip)) { + $s = explode(' ', $item['date']); + $d = explode('-', $s[0]); + $t = explode(':', $s[1]); + echo "{'start': new Date(".$d[0].",".$d[1].",".$d[2].",".$t[0].",".$t[1].",".$t[2]."), 'content': '".$item['msg']."', 'className': '".$classname."'},\n"; + } } ?> /* { From ca3970c9c391d0e298ed343ea96074f866ee93c2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 23 Sep 2015 18:05:30 +0200 Subject: [PATCH 2/2] fix setting date in timeline --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 8de279bce..eec9c49c6 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2037,7 +2037,7 @@ mayscript> $s = explode(' ', $item['date']); $d = explode('-', $s[0]); $t = explode(':', $s[1]); - echo "{'start': new Date(".$d[0].",".$d[1].",".$d[2].",".$t[0].",".$t[1].",".$t[2]."), 'content': '".$item['msg']."', 'className': '".$classname."'},\n"; + echo "{'start': new Date(".$d[0].",".($d[1]-1).",".$d[2].",".$t[0].",".$t[1].",".$t[2]."), 'content': '".$item['msg']."', 'className': '".$classname."'},\n"; } } ?>