Huabao Protocol A5 recording the wrong deviceTime and fixTime

Rwema Aimable7 years ago

According to the server logs, the HEX received from devices report the correct time. But what gets recorded in mysql is the reported time minus 6 hours. The server and mysql have the correct timezone set.

2018-06-11 19:47:06 DEBUG: [049115E9: 10000 < XX.XX.XX.XX] HEX: 7e0200002c001401708917005c0000000000040007001e13ee01cc64ba05690000000018061117470501040015eec003020000250400000000527e
2018-06-11 19:47:06  INFO: [049115E9] id: 001401708917, time: 2018-06-11 11:47:05, lat: -1.97118, lon: 30.17235, course: 0.0

In the example above, the device reports the time stamp 180611174705 or 2018-06-11 17:47:05
But decoded time is 2018-06-11 11:47:05

Anton Tananaev7 years ago

What is your server timezone? Remember that server always expects UTC time from devices. If your device reports local time, you need to configure it to report UTC.

Rwema Aimable7 years ago

The server timezone is ACT + 2. The device is configured on GMT+2. I can change this as the devices have a thermal printer that prints local movement reports. Changing the time would make these report wrong. However, with this constraint, I would expect the Traccar server to record a difference of 2 hours, not 6. Basically saving the time as it was received from devices as the Linux server time and devices time is the same

Rwema Aimable7 years ago

sorry the server timezone is CAT, which is equivalent to GMT+2