diff options
Diffstat (limited to 'src/org/traccar/protocol/XexunProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/XexunProtocolDecoder.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java index 34059501b..f6b7bcb44 100644 --- a/src/org/traccar/protocol/XexunProtocolDecoder.java +++ b/src/org/traccar/protocol/XexunProtocolDecoder.java @@ -17,14 +17,13 @@ package org.traccar.protocol; import java.text.ParseException; import java.util.Calendar; -import java.util.GregorianCalendar; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; -import org.traccar.model.DataManager; import org.traccar.GenericProtocolDecoder; +import org.traccar.model.DataManager; import org.traccar.model.Position; /** @@ -76,7 +75,7 @@ public class XexunProtocolDecoder extends GenericProtocolDecoder { Integer index = 1; // Time - Calendar time = new GregorianCalendar(TimeZone.getTimeZone("UTC")); + Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC")); time.clear(); time.set(Calendar.HOUR, Integer.valueOf(parser.group(index++))); time.set(Calendar.MINUTE, Integer.valueOf(parser.group(index++))); @@ -100,7 +99,7 @@ public class XexunProtocolDecoder extends GenericProtocolDecoder { // Altitude position.setAltitude(0.0); - + // Speed position.setSpeed(Double.valueOf(parser.group(index++))); |