Can I use servertime instead of fixtime

Arvind5 years ago

Does it possible to change fixtime to servertime in statecontrolled.js?
In device state, it shows wrong time, so I want to change field to servertime In place of fixtime.

Arvind5 years ago

Or devicetime?

Anton Tananaev5 years ago

It is possible.

Arvind5 years ago

Can I put devicetime in place of fixtime in statecontroller.js directly or any other file I have to edit.

Arvind5 years ago

want to change devicetime in place of fixtime in StateController.js.
I tried to change but after change device state is blank.
How many file and which I need to edit.

Matjaz Dobnik5 years ago

Hi,

I have similar problem. My device reports wrong date. Time is ok. So possibility to use server date instead gps date would be sollution for me.
How this can be done?

Arvind5 years ago

Nothing to do. Just update timezone of device. Check manual for command and set it on UTC. Nothing else.
Remember that if device is moving then it will effect on timezone.

Matjaz Dobnik5 years ago

I didn't write enough information. It is not problem of timezone on my device. It reports the same date 990901 (traccar interpret it as 1st September 2099) after every restart of device. So I did everything I found on internet with my device to solve this but no success.
But everything else works fine. I know that device was not expensive, but still I see no reason to through it away if there is possibility to make modification in software to make it work.

Arvind5 years ago

You haven't explained complete problem yet. Share screenshot where is the problem and what is problem.?

Matjaz Dobnik5 years ago

My device output data like this:
(027043675693BR00990901A4636.3896N01507.3723E002.6220014327.2500000000L00000000)

You can see that date data is completely wrong and it is not possible to change that. My idea is that traccar use date from the server instead of date which gps device send every time and store it to database.

Arvind5 years ago

There is three things servertime, devicetime, fixtime.
With which one do you have issue?
Which is wrong?

Anton Tananaev5 years ago

I have implemented a configuration option to force server or device time. It can be configured globally or per protocol. Usage example:

    <entry key='time.override'>serverTime</entry>
    <entry key='time.protocols'>osmand,gt06</entry>
Matjaz Dobnik5 years ago

Where I can download update?

Anton Tananaev5 years ago

Wait for release or build from source code.

Jorge3 years ago

Thank you Anton for the possibility of overriding device time, it was the solution for us.

In /opt/traccar/conf/traccar.xml adding a line <entry key='time.override'>serverTime</entry>

In case our story can help someone, in my unit we have several old Lommy Pro 2 that have not been used in years. We wanted to change this and I set up a Traccar server on premises. I configured everything but noticed that messages sent by Lommy were being sent with the wrong date and time (year 2001, no less) and I honestly do not know how to update them to current time (they should be getting the right time from GPS satellites right??). The rest of the information (position, bearing,...) is right so it should be no problem. However the icon on the map of Traccar web was not being displayed correctly (it was always in the north pole!).
I checked the log and Traccar server seems to correctly receive the information as sent by Lommy device (right position and the wrong date/time), so I am guessing Traccar Web does some checking on date/time before displaying the icons.
As long as the device is not sending correct time, we are taking the risk of assuming that the message received corresponds to current time (or a few seconds before), but it works for us. I hope this helps other people to troubleshoot their devices.