Events using DeviceTime

zzmyers6 years ago

I am using Traccar server 3.10 and I would like to modify it to use the deviceTime for events rather than serverTime due to the way a set of trackers I have works. I had 8 low battery events on one device show all at the same time, but looking at the logs finds they occurred over a period of several hours when the tracker was unable to connect to the phone network. I would have like them to log the event at the reported deviceTime. If no deviceTime exists then I would fall back to serverTime.

Where would I make such a change and how hard would it be?

Anton Tananaev6 years ago

Probably you need to change event handler(s). It's not hard if you know Java.

zzmyers6 years ago

Ok, I guess that ALARM_LOW_BATTERY is handled by AlertEventHandler.java as it is an alarm type. Then I assume I would parse which date I want from the position record and call the setServerTime property on the Event class created. Am I on the right track here?