aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/protocol/PstProtocolDecoder.java2
-rw-r--r--src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/PstProtocolDecoder.java b/src/main/java/org/traccar/protocol/PstProtocolDecoder.java
index 40caa9727..a93dd251f 100644
--- a/src/main/java/org/traccar/protocol/PstProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/PstProtocolDecoder.java
@@ -102,7 +102,7 @@ public class PstProtocolDecoder extends BaseProtocolDecoder {
}
}
- return position;
+ return position.getFixTime() != null ? position : null;
}
return null;
diff --git a/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
index 9c3d2108e..cab8dc1a0 100644
--- a/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class PstProtocolDecoderTest extends ProtocolTest {
PstProtocolDecoder decoder = new PstProtocolDecoder(null);
verifyNull(decoder, binary(
+ "2faf9b4c0600000012054f36ec194000bfa9"));
+
+ verifyNull(decoder, binary(
"2faf9b5605e40000e0022faf9b560196cb2f003f0c72ab56129ae0847ac98801cd1ed8"));
verifyNull(decoder, binary(