Version 4.15 - strange behaviour on gt06 protocol devices

Matthias Hübner2 years ago

Hello,

Since update to version 4.15 (with a new database) I do have a strange behaviour on gt06 protocol devices. They show incorrect time (-1 hour) on most messages:

See: https://drive.google.com/file/d/1PhO1G7R86HEWwU0dRgqD4KfFZ8cBiO-2/view?usp=sharing

Only Messages with the attributes '{"status"...' have the correct devicetime, other all have devicetime = servertime - 1 hour which equals GMT.
Devices have timezone set to GMT+1 which is local timezone.

All position queries deliver GMT as position time I need to have localtime.

How to fix this problem?

Best Regards

Anton Tananaev2 years ago

Is your device reporting UTC time?

Matthias Hübner2 years ago

Hello Anton,

no, device is reporting UTC+1 or Europe/Berlin.

Anton Tananaev2 years ago

That's the problem. Did you configure server to expect UTC+1?

Matthias Hübner2 years ago

This is not the problem with the Teltonika Devices? see: https://drive.google.com/file/d/1ReVy_u2Ia-x5_r7IPaQRj1Q5Pa2sY_Zg/view?usp=sharing
Database Server Timezone is CET, see https://drive.google.com/file/d/1VHY1mRu6LWi8GpvKnjywggojn4soLXWt/view?usp=sharing
CET is UTC+1
Database is MariaDB 10

Anton Tananaev2 years ago

Teltonika always reports UTC time, so obviously it won't be a problem.

Matthias Hübner2 years ago

And, if i reset the gt06 devices to report in utc the problem will be gone?

Anton Tananaev2 years ago

Yes. Or configure timezone for the protocol, as I mentioned earlier.

Matthias Hübner2 years ago

I experimented with gt06.timezone = 3600 , but I was not successful. Also setting timezone = Europe/Berlin as attribute for each device was not purposeful. But Perhaps it is a error in MariaDB10 which does not accept CET as Timezone descriptor. Also 'UTC+1' in java conection call was a problem. I will change all to Europe/Berlin or Europe/Paris.

I will report on success.

Anton Tananaev2 years ago

It doesn't matter what timezone is configured in the database. That's a completely unrelated thing.

Matthias Hübner2 years ago

The problem persists. Now all gt06 devices are on utc timezone and deliver utc. server and users are in timezone Europe/Berlin, but traccar stores and shows devicetime in utc and fixtime also. Servertime is in local timezone. But not all rcords are concerned. Records having "status" entries are different. See: https://docs.google.com/document/d/1c5Jmg0gqt6NQh8JxB1B6lNUfr7ZDVb3P/edit?usp=sharing&ouid=103423128504249679633&rtpof=true&sd=true
How to change Configuration, that devicetime figures same timezone than servertime?

Anton Tananaev2 years ago

Does the time look correct in the log?

Matthias Hübner2 years ago

I do not find these "singularities" in the logfile. Find a example of one of the devices here: https://drive.google.com/file/d/1UZ47LvphDDX6napitLKDe4yOVk_-yUel/view?usp=sharing . I did a "grep" on the log to filter.

Anton Tananaev2 years ago

I see there's a 2 hour difference between server time and device time:

2022-03-28 19:21:50  INFO: [654e28d2] id: ..., time: 2022-03-28 17:21:49, ...

It indicates that there's still a problem with the time device reports.

Matthias Hübner2 years ago

Perhaps, there is a problem with the time device, i set alle gt06 to default = GMT = UTC, smslink now reports UTC on the devices. And I do have the same entries in database as before! If there where not these "status" records with the other devicetime entries I would have set a trigger on database inserts. The 2 hour delay is between UTC and CEST = Europe/Berlin.

There also was no change on setting gt06.timezone = 3600 in config. And multiple reboots of the whole system.

I did not have the problem with MariaDB 5 and the older traccar version (3.??) I run before.