From c6b02b12eed102d057a0c7880c39d7b0c6acddcb Mon Sep 17 00:00:00 2001 From: Vitaly Litvak Date: Thu, 10 Dec 2015 12:32:31 +0300 Subject: [PATCH] For #393 - on reports take user's timezone into account when printing dates and times --- .../java/org/traccar/web/server/reports/ReportGenerator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/traccar/web/server/reports/ReportGenerator.java b/src/main/java/org/traccar/web/server/reports/ReportGenerator.java index 5f6fb5ec..b9a2b8e2 100644 --- a/src/main/java/org/traccar/web/server/reports/ReportGenerator.java +++ b/src/main/java/org/traccar/web/server/reports/ReportGenerator.java @@ -69,7 +69,9 @@ public final void generate(Report report) throws IOException { : TimeZone.getTimeZone(currentUser.getUserSettings().getTimeZoneId()); Locale locale = new Locale(getLocale()); dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", locale); + dateFormat.setTimeZone(timeZone); longDateFormat = new SimpleDateFormat("d MMM yyyy", locale); + longDateFormat.setTimeZone(timeZone); renderer.start(report); generateImpl(report);