aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/helper/DateBuilder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-08-14 08:22:00 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-08-14 08:22:00 -0700
commit127d7e59b3a21c8aa98c6f7953b86d6008f959f2 (patch)
treeb1ea22551cfea279f490b0c4c03d8f80953a4937 /src/main/java/org/traccar/helper/DateBuilder.java
parentbdc4c6147d7fe9785d6b3c9290c69665f36202af (diff)
downloadtrackermap-server-127d7e59b3a21c8aa98c6f7953b86d6008f959f2.tar.gz
trackermap-server-127d7e59b3a21c8aa98c6f7953b86d6008f959f2.tar.bz2
trackermap-server-127d7e59b3a21c8aa98c6f7953b86d6008f959f2.zip
Fix month decoding
Diffstat (limited to 'src/main/java/org/traccar/helper/DateBuilder.java')
-rw-r--r--src/main/java/org/traccar/helper/DateBuilder.java4
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) {