aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java b/src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java
index e7ea87428..7277b1e5f 100644
--- a/src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java
@@ -33,6 +33,7 @@ import java.net.SocketAddress;
import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
+import java.util.Date;
import java.util.LinkedList;
import java.util.TimeZone;
@@ -85,6 +86,9 @@ public class OrbcommProtocolDecoder extends BaseProtocolDecoder {
JsonObject field = fields.getJsonObject(j);
String value = field.getString("Value");
switch (field.getString("Name").toLowerCase()) {
+ case "eventtime":
+ position.setDeviceTime(new Date(Long.parseLong(value) * 1000));
+ break;
case "latitude":
position.setLatitude(Integer.parseInt(value) / 60000.0);
break;