From 2ba06b327a08432ebfc9e8a41a36bf124e087af6 Mon Sep 17 00:00:00 2001 From: jon-stumpf Date: Sun, 12 Mar 2017 11:50:59 -0400 Subject: Implemented Parser.nextDateTime(); --- src/org/traccar/protocol/GlobalSatProtocolDecoder.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/org/traccar/protocol/GlobalSatProtocolDecoder.java') diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java index 4c127a90b..a35cfa761 100644 --- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java +++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java @@ -212,12 +212,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { position.setDeviceId(deviceSession.getDeviceId()); position.setValid(!parser.next().equals("1")); - - DateBuilder dateBuilder = new DateBuilder() - .setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt()) - .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt()); - position.setTime(dateBuilder.getDate()); - + position.setTime(parser.nextDateTime(Parser.DateTimeFormat.DMY2_HMS)); position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG_MIN)); position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG_MIN)); position.setAltitude(parser.nextDouble()); -- cgit v1.2.3