diff options
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/CastelProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/NavigilProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/TaipProtocolDecoder.java | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java index 358f6bb1d..95862cc9a 100644 --- a/src/org/traccar/protocol/CastelProtocolDecoder.java +++ b/src/org/traccar/protocol/CastelProtocolDecoder.java @@ -123,7 +123,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder { response.writeShort(ChannelBuffers.swapShort(MSG_LOGIN_RESPONSE)); response.writeInt(0xFFFFFFFF); response.writeShort(0); - response.writeInt((int) (new Date().getTime() / 1000)); + response.writeInt((int) (System.currentTimeMillis() / 1000)); response.writeShort(Crc.crc16Ccitt(response.toByteBuffer(0, response.writerIndex()))); response.writeByte(0x0D); response.writeByte(0x0A); channel.write(response, remoteAddress); diff --git a/src/org/traccar/protocol/NavigilProtocolDecoder.java b/src/org/traccar/protocol/NavigilProtocolDecoder.java index 2b75e7840..7938fd7cc 100644 --- a/src/org/traccar/protocol/NavigilProtocolDecoder.java +++ b/src/org/traccar/protocol/NavigilProtocolDecoder.java @@ -70,7 +70,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder { header.writeShort(0); header.writeShort(Crc.crc16X25Ccitt(data.toByteBuffer())); header.writeInt(0); - header.writeInt((int) (new Date().getTime() / 1000) + LEAP_SECONDS_DELTA); + header.writeInt((int) (System.currentTimeMillis() / 1000) + LEAP_SECONDS_DELTA); if (channel != null) { channel.write(ChannelBuffers.copiedBuffer(header, data)); diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java index 8c1448193..252f4e712 100644 --- a/src/org/traccar/protocol/TaipProtocolDecoder.java +++ b/src/org/traccar/protocol/TaipProtocolDecoder.java @@ -75,7 +75,7 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder { long millis = time.getTimeInMillis() + seconds * 1000; - long diff = new Date().getTime() - millis; + long diff = System.currentTimeMillis() - millis; if (diff > 12 * 60 * 60 * 1000) { millis += 24 * 60 * 60 * 1000; |