Failed to store position

Fabioa year ago

HI,
using mysql I noticed that when a device loses the GPS signal while inside a building, the server reports this error

WARN: Failed to store position - Data truncation: Incorrect datetime value: '1970-01-01 00:00:00' for column `traccar`.`tc_positions`.`fixtime` at row 1 - MysqlDataTruncation (... < QueryBuilder:469 < DatabaseStorage:95 < DefaultDataHandler:47 < ...)

probably due to the wrong date, is
this normal? don't you start the check with LBS?
Thank you

Track-tracea year ago

And not telling which device, which protocol, server log etc ?

Fabioa year ago

Coban 103B device, gps103 protocol, server log the one I reported previously

Anton Tananaeva year ago

What's your database configuration?

Fabioa year ago

mysql with mariadb

Anton Tananaeva year ago

I meant the URL you're using in Traccar.

Fabioa year ago
jdbc:mysql://localhost/traccar?zeroDateTimeBehavior=round&serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''
Anton Tananaeva year ago

Seems like the mode is not working for MariaDB:

sessionVariables=sql_mode=''

Have you tried using mariadb driver instead?

Fabioa year ago

No, I have no tired, I don't know how, can you help me?
Consider that the problem only occurs when the Tracker loses the GPS signal and the date passes 1970

Anton Tananaeva year ago
Fabioa year ago

I'll try tomorrow, let you know
Thanks so much