diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-07 10:29:26 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-07 10:29:26 -0700 |
commit | dc3297fe556cbf28cf05eb2bbf127c6ba06514fe (patch) | |
tree | f196ff5a326c4ccd1ed901fdfc1245abd3a7f2c4 /src | |
parent | 10c5a55e1f08fadb8125a782d831b835aed2fea9 (diff) | |
download | trackermap-server-dc3297fe556cbf28cf05eb2bbf127c6ba06514fe.tar.gz trackermap-server-dc3297fe556cbf28cf05eb2bbf127c6ba06514fe.tar.bz2 trackermap-server-dc3297fe556cbf28cf05eb2bbf127c6ba06514fe.zip |
Fix server time override
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/handler/TimeHandler.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/handler/TimeHandler.java b/src/main/java/org/traccar/handler/TimeHandler.java index d8039518c..822c22a0a 100644 --- a/src/main/java/org/traccar/handler/TimeHandler.java +++ b/src/main/java/org/traccar/handler/TimeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 Anton Tananaev (anton@traccar.org) + * Copyright 2019 - 2020 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,8 +53,10 @@ public class TimeHandler extends ChannelInboundHandlerAdapter { Position position = (Position) msg; if (useServerTime) { position.setDeviceTime(position.getServerTime()); + position.setFixTime(position.getServerTime()); + } else { + position.setFixTime(position.getDeviceTime()); } - position.setFixTime(position.getDeviceTime()); } ctx.fireChannelRead(msg); |