aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/GlobalSatProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
index 70c1dfe60..5b4dc5e9b 100644
--- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -111,7 +111,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
time.set(Calendar.MONTH, Integer.valueOf(value.substring(2, 4)) - 1);
time.set(Calendar.YEAR, 2000 + Integer.valueOf(value.substring(4)));
value = values[++valueIndex];
- time.set(Calendar.HOUR, Integer.valueOf(value.substring(0, 2)));
+ time.set(Calendar.HOUR_OF_DAY, Integer.valueOf(value.substring(0, 2)));
time.set(Calendar.MINUTE, Integer.valueOf(value.substring(2, 4)));
time.set(Calendar.SECOND, Integer.valueOf(value.substring(4)));
position.setTime(time.getTime());
@@ -225,7 +225,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));
time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);
time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++)));
- time.set(Calendar.HOUR, Integer.valueOf(parser.group(index++)));
+ time.set(Calendar.HOUR_OF_DAY, Integer.valueOf(parser.group(index++)));
time.set(Calendar.MINUTE, Integer.valueOf(parser.group(index++)));
time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));
position.setTime(time.getTime());