diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/helper/DateBuilder.java | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |