Update messages without date utilizing last fix date/time. Option to prefer server time?

Paul5 years ago

Update messages without date are utilizing last client date/time. Is there a knob to say "if date not in message payload, use received server-time"?

From a report/export perspective, this is very confusing on the console because it shows the heartbeat messages all arriving at the same date/time, when they are really 5 minutes apart.

It does say "FIXTIME" in the database, but it appears there's not really a fix time being provided by the device when viewing the actual traffic on the wire. Traccar must be copying this field over.

Description text

                  SERVERTIME            DEVICETIME           FIXTIME
gt06	4	1/11/2020 20:24	1/11/2020 20:24	1/11/2020 20:24
gt06	4	1/11/2020 20:23	1/11/2020 20:23	1/11/2020 20:23
gt06	4	1/11/2020 20:22	1/11/2020 20:22	1/11/2020 20:15
gt06	4	1/11/2020 20:17	1/11/2020 20:17	1/11/2020 20:15
gt06	4	1/11/2020 20:15	1/11/2020 20:15	1/11/2020 20:15
...
gt06	4	1/11/2020 17:23	1/11/2020 17:23	1/11/2020 17:23
gt06	4	1/11/2020 17:22	1/11/2020 17:22	1/11/2020 17:22
gt06	4	1/11/2020 17:21	1/11/2020 17:21	1/11/2020 17:21
gt06	4	1/11/2020 17:19	1/11/2020 17:19	1/11/2020 17:19
gt06	4	1/11/2020 17:19	1/11/2020 17:19	1/11/2020 17:16
gt06	4	1/11/2020 17:16	1/11/2020 17:16	1/11/2020 17:16
gt06	4	1/11/2020 17:15	1/11/2020 17:15	1/11/2020 17:15
Anton Tananaev5 years ago

You can use time.override configuration parameter to override all time values. Possible values are 'deviceTime' and 'serverTime'.

Paul5 years ago

Thanks Anton,

What does this knob do, set all 3 time values to SERVERTIME for each message globally? I assume it's not a reporting function.

A few thoughts/questions:

  1. Is there a way to only use servertime where fixtime was not provided? I don't want to break the valid fixtime data when it is provided by the device, which sounds like this command will do.

For example, the top 3 I want to preserve the valid fix-time (thy all match). The bottom 3 I want it to use servertime, as it wasn't provided in the data package.

It looks like today it copies the last device fixtime when not provided, rather than using the servertime. Is this correct?

1/11/2020 20:13	1/11/2020 20:13	1/11/2020 20:13
1/11/2020 20:13	1/11/2020 20:13	1/11/2020 20:13
1/11/2020 20:10	1/11/2020 20:10	1/11/2020 20:10
1/11/2020 20:07	1/11/2020 20:07	1/11/2020 17:29
1/11/2020 20:02	1/11/2020 20:02	1/11/2020 17:29
1/11/2020 19:57	1/11/2020 19:57	1/11/2020 17:29
  1. I assume there's a reason traccar doesn't leave the fixtime blank when not provided . No need to go there if it's the case.
Anton Tananaev5 years ago

It's global and there is no way to configure it to selectively override values.

Paul5 years ago

Thanks Anton, based on this info I've made a feature request:

Feature Request: Utilize current SERVERTIME to populate FIXTIME when client doesn't provide, rather than copying last device FIXTIME. #4466

https://github.com/traccar/traccar/issues/4466