4.13 : index key event_deviceid_servertime should be renamed to event_deviceid_eventtime ?

mbodea20074 years ago

Hello, for 4.13, after renaming in table tc_events column servertime to eventtime, should index key be also renamed to event_deviceid_eventtime ?

Anton Tananaev4 years ago

Liquibase doesn't support renaming indexes. That's why it's not renamed.

Gps man4 years ago

This change of servertime to eventtime will have huge impact on the installations that are running for years. As I understand from the GITHUB log, it looks like now the device time will be considered for events which will be impacted by the timezone in which this device is being used.

Please suggest recommendations for old users before traccar makes final release of 4.13

Anton Tananaev4 years ago

device time will be considered for events which will be impacted by the timezone in which this device is being used

Unless you have misconfigured timezone somewhere, it won't be a problem. All time store in the database without any timezone information. So it should match.

Gps man4 years ago

Certain devices like ITS and Country Specific protocol donot allow to change timezone of the device. In that case the device will send data in that specific timezone only.

I feel, this requires elaborate study to avoid any outage / downtime for existing installatins.

Also, please share what change will be there in this regard on websocket and webapi in respect to this change.

Anton Tananaev4 years ago

It doesn't matter what timezones devices use to send data. It sounds like you don't fully understand how time is handled. Can you give a specific example you are worried about.

Gps man4 years ago

Servertime are in UTC. All data in the events table is stored in UTC which is also the timezone set for all devices except ITS protocol. Now when event will send device time as per the new change, the eventtime will have timestamp from the device which is not UTC. In this case when we will query the events table with the eventtime column the sort index may give wrong results.

eg. TK103 and GT06 will send current time in UTC while the ITS device will send IST time. the column is just storing it as time digit irrespective of the time zone.

Hope i am able explain

Anton Tananaev4 years ago

No, you completely misunderstanding how it works. Device time is always converted to local server time first.