If servertime > devicetime the position is not returned

Muammar2 years ago

API endpoint /api/positions and websocket ignore positions, if servertime > devicetime.
For example, 879 is returned, but 880 is not returned.

id     | protocol | deviceid |       servertime                       |       devicetime
879 | lacak       |        4      | 2022-05-29 18:58:34.497 | 2022-05-29 21:48:52.431
880 | lacak       |        4      | 2022-05-29 19:05:27.293 | 2022-05-29 18:48:52.431

In real case when mobile phone sends position, I have servertime > devicetime, and it seems normal:

2022-05-29 17:59:36.808 | 2022-05-29 17:59:34.04
Anton Tananaev2 years ago

There's no such filtering. There must be some other reason.

Muammar2 years ago

Okay, it turned out that we synthetically submitted a coordinate from the future and then when from a real device coordinates were submitted, their timestamp was smaller and this data wasn't sent to the frontend, because traccar server had a fresher coordinate.