From 127d7e59b3a21c8aa98c6f7953b86d6008f959f2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 14 Aug 2019 08:22:00 -0700 Subject: Fix month decoding --- src/main/java/org/traccar/helper/DateBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/traccar/helper/DateBuilder.java b/src/main/java/org/traccar/helper/DateBuilder.java index 6e1b779f0..9752f6977 100644 --- a/src/main/java/org/traccar/helper/DateBuilder.java +++ b/src/main/java/org/traccar/helper/DateBuilder.java @@ -69,7 +69,9 @@ public class DateBuilder { public DateBuilder setCurrentDate() { Calendar now = Calendar.getInstance(calendar.getTimeZone()); - return setYear(now.get(Calendar.YEAR)).setMonth(now.get(Calendar.MONTH)).setDay(now.get(Calendar.DAY_OF_MONTH)); + return setYear(now.get(Calendar.YEAR)) + .setMonth(now.get(Calendar.MONTH) + 1) + .setDay(now.get(Calendar.DAY_OF_MONTH)); } public DateBuilder setHour(int hour) { -- cgit v1.2.3