From 31891802f3f1043f83ba57ec71f7f8d81a299fa8 Mon Sep 17 00:00:00 2001 From: whikernel Date: Thu, 14 Mar 2024 08:48:55 +0100 Subject: [PATCH] [FIX] Fixed date format in badge timelkine --- source/app/static/assets/js/iris/case.timeline.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/app/static/assets/js/iris/case.timeline.js b/source/app/static/assets/js/iris/case.timeline.js index 92c2a53f8..dd7f6e7ad 100644 --- a/source/app/static/assets/js/iris/case.timeline.js +++ b/source/app/static/assets/js/iris/case.timeline.js @@ -621,6 +621,11 @@ function buildEvent(event_data, compact, comments_map, tree, tesk, tmb, idx, rea let day = dta[0]; + // Transform the date to the user's system format. day is in the format YYYY-MM-DD. We want our date in the user's host format, without the minutes and seconds. + // First parse the date to a Date object + let date = new Date(day); + // Then use the toLocaleDateString method to get the date in the user's host format + day = date.toLocaleDateString(); let hour = dta[1].split('.')[0];