Position times always 3 hours ahead of the time zone

Antonio Junior 2 years ago

Greetings, could anyone help me? I have Traccar 5.9 which is reporting positions 3 hours ahead. the system already has the correct date and time for my Brazil timezone.
In the server settings it is ccomAmerica/São Paulo
The devices have their time set to GMT -3 (Brazil). If any device has incorrect gmt, could this cause this?

root@rodrigo:/etc/ssh# date
ter 06 fev 2024 12:26:35 -03

MySQL is getting the system time.


mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM             | SYSTEM              |
+--------------------+---------------------+
1 row in set (0,00 sec)

mysql>

Positions

20151 osmand 44 2024-02-06 15:28:53 2024-02-06 15:28:52 024-02-06 15:28:52 -22.728855

20152 h02 30 2024-02-06 15:28:54 2024-02-06 15:28:52 2024-02-06 15:28:52 -22.747686666666667
504f5354202f3f69643d32373233313930362674696d657374616d703d31373037323333383235266c61743d2d32322e373238383033266c6f6e3d2d34332e3434393234332673706565643d302662656172696e673d3131332e30323337393732383031323926616c7469747564653d32362e323435393233343233323038332661636375726163793d362e36373337323131373134313232383326626174743d383220485454502f312e310d0a486f73743a2073696c766572666f78736f6c7574696f6e732e636f6d2e62723a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f35392043464e6574776f726b2f313430342e302e352044617277696e2f32322e332e300d0a4163636570742d4c616e67756167653a2070742d42522c70743b713d302e390d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
POST /?id=27231906&timestamp=1707233825&lat=-22.728803&lon=-43.449243&speed=0&bearing=113.023797280129&altitude=26.2459234232083&accuracy=6.673721171412283&batt=82 HTTP/1.1
Host: silverfoxsolutions.com.br:5055
Connection: keep-alive
Accept: */*
User-Agent: TraccarClient/59 CFNetwork/1404.0.5 Darwin/22.3.0
Accept-Language: pt-BR,pt;q=0.9
Content-Length: 0
Accept-Encoding: gzip, deflate
Supports Unix timestamps in seconds, milliseconds, microseconds and nanoseconds.
Assuming that this timestamp is in seconds:
GMT: Tuesday, 6 February 2024 15:37:05
Your time zone: Terça-feira, 6 de fevereiro de 2024 12:37:05 GMT-03:00
Relative: A minute ago
2a48512c373032383836373338352c56312c3135343132352c412c323234342e353234372c532c30343332372e323035322c572c3030302e30302c3136322c3036303232342c46464646464246462c3732342c31312c35333032312c31353337343333383323
*HQ,7028867385,V1,154125,A,2244.5247,S,04327.2052,W,000.00,162,060224,FFFFFBFF,724,11,53021,153743383#

Thank you for any help.

Anton Tananaev 2 years ago

Server expects UTC time from devices, so if it's not, it would cause this problem.

Antonio Junior 2 years ago

Thanks Anton, but do I see this in the traccar-client app for example? Could you give me some guidance on how to resolve this?

Anton Tananaev 2 years ago

If it happens even for Traccar Client, it probably means you misconfigured the timezone somewhere on the server.

Anton Tananaev 2 years ago

Can we see proper logs?

Antonio Junior 2 years ago

Could these be? Thanks?
I thought if that would solve it?

key='time.override'>serverTime
key='time.protocols'>osmand,gt06
root@rodrigo:/etc/ssh# tail -f /opt/traccar/logs/tracker-server.log
2024-02-06 13:30:57  INFO: [Te49fb28e] id: 7028867169, time: 2024-02-06 13:30:55, lat: -22.79904, lon: -43.43353, speed: 2.1, course: 252.0
2024-02-06 13:30:58  INFO: [Ted94abe9: h02 < 177.79.118.255] 2a48512c373032383836363438332c56312c3135303430362c412c323233302e333431372c532c30343333312e323231312c572c3031382e35372c3134332c3036303232342c46424646444646462c3732342c31312c35373032342c31363930383735343123
2024-02-06 13:30:58  INFO: [Ted94abe9: h02 > 177.79.118.255] 2a48512c373032383836363438332c56342c56312c323032343032303631363330353823
2024-02-06 13:30:58  INFO: [Ted94abe9] id: 7028866483, time: 2024-02-06 12:04:06, lat: -22.50570, lon: -43.52035, speed: 18.6, course: 143.0
2024-02-06 13:30:58  INFO: [T25b8a6aa: osmand < 177.27.18.75] 504f5354202f3f69643d32373233313930362674696d657374616d703d31373037323337303538266c61743d2d32322e373239373130266c6f6e3d2d34332e3435353234312673706565643d342e3537353436383639373737343635322662656172696e673d3233372e3037303935333336393134303626616c7469747564653d32352e36333637363732363136363135392661636375726163793d382e32313435353930313834373037363226626174743d363320485454502f312e310d0a486f73743a2073696c766572666f78736f6c7574696f6e732e636f6d2e62723a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f35392043464e6574776f726b2f313430342e302e352044617277696e2f32322e332e300d0a4163636570742d4c616e67756167653a2070742d42522c70743b713d302e390d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
2024-02-06 13:30:58  INFO: [T25b8a6aa: osmand > 177.27.18.75] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-02-06 13:30:58  INFO: [T25b8a6aa] id: 27231906, time: 2024-02-06 13:30:58, lat: -22.72971, lon: -43.45524, speed: 4.6, course: 237.1, accuracy: 8.2
2024-02-06 13:30:58  INFO: [Taa349d02: h02 < 177.25.179.227] 2a48512c373032383836373734392c56312c3135313933322c412c323231372e383132342c532c30343335322e313036302c572c3032352e36382c3238372c3036303232342c46424646444646462c3732342c31312c35373032342c31363932313835383323
2024-02-06 13:30:58  INFO: [Taa349d02: h02 > 177.25.179.227] 2a48512c373032383836373734392c56342c56312c323032343032303631363330353823
2024-02-06 13:30:58  INFO: [Taa349d02] id: 7028867749, time: 2024-02-06 12:19:32, lat: -22.29687, lon: -43.86843, speed: 25.7, course: 287.0
2024-02-06 13:30:59  INFO: [T25b8a6aa: osmand < 177.27.18.75] 504f5354202f3f69643d32373233313930362674696d657374616d703d31373037323337303539266c61743d2d32322e373239373235266c6f6e3d2d34332e3435353236352673706565643d352e3636373438333134313130383430392662656172696e673d3233362e3632393838323831323526616c7469747564653d32352e37373031333637363839323936362661636375726163793d382e32303632333834383135313336333726626174743d363320485454502f312e310d0a486f73743a2073696c766572666f78736f6c7574696f6e732e636f6d2e62723a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f35392043464e6574776f726b2f313430342e302e352044617277696e2f32322e332e300d0a4163636570742d4c616e67756167653a2070742d42522c70743b713d302e390d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
2024-02-06 13:30:59  INFO: [T25b8a6aa: osmand > 177.27.18.75] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-02-06 13:30:59  INFO: [T25b8a6aa] id: 27231906, time: 2024-02-06 13:30:59, lat: -22.72973, lon: -43.45527, speed: 5.7, course: 236.6, accuracy: 8.2
2024-02-06 13:30:59  INFO: [T4ffcfdf3: h02 < 177.25.178.52] 2a48512c373032383833363633372c56312c3136333035382c562c323234352e383432332c532c30343332362e393137392c572c3030302e30302c3030302c3036303232342c46464646464246462c3732342c31312c35333032312c31353338353632353823
2024-02-06 13:30:59  INFO: [T4ffcfdf3: h02 > 177.25.178.52] 2a48512c373032383833363633372c56342c56312c323032343032303631363330353923
2024-02-06 13:30:59  INFO: [T4ffcfdf3] id: 7028836637, time: 2024-02-06 13:30:58, lat: -22.76404, lon: -43.44863, course: 0.0
2024-02-06 13:30:59  INFO: [T5dc9815c: h02 < 177.79.117.98] 2a48512c373032383836363430372c56312c3136333034332c412c323235392e333836312c532c30343331332e363630342c572c3031382e32312c3230392c3036303232342c46464646444646462c3732342c31312c35303532312c31353336333430353023
2024-02-06 13:30:59  INFO: [T5dc9815c: h02 > 177.79.117.98] 2a48512c373032383836363430372c56342c56312c323032343032303631363330353923
2024-02-06 13:30:59  INFO: [T5dc9815c] id: 7028866407, time: 2024-02-06 13:30:43, lat: -22.98977, lon: -43.22767, speed: 18.2, course: 209.0
2024-02-06 13:30:59  INFO: [Te49fb28e: h02 < 177.25.178.112] 2a48512c373032383836373136392c56312c3136333035372c412c323234372e393433342c532c30343332362e303134352c572c3030342e34322c3234332c3036303232342c46464646444646462c3732342c31312c33323132342c31353339303539323223
2024-02-06 13:30:59  INFO: [Te49fb28e: h02 > 177.25.178.112] 2a48512c373032383836373136392c56342c56312c323032343032303631363330353923
2024-02-06 13:30:59  INFO: [Te49fb28e] id: 7028867169, time: 2024-02-06 13:30:57, lat: -22.79906, lon: -43.43358, speed: 4.4, course: 243.0
2024-02-06 13:31:00  INFO: [T25b8a6aa: osmand < 177.27.18.75] 504f5354202f3f69643d32373233313930362674696d657374616d703d31373037323337303630266c61743d2d32322e373239373433266c6f6e3d2d34332e3435353239352673706565643d362e3939363636303431333136323530342662656172696e673d3233362e3632393838323831323526616c7469747564653d32352e38393438303136373136313637332661636375726163793d382e30383739373439303336343730373126626174743d363320485454502f312e310d0a486f73743a2073696c766572666f78736f6c7574696f6e732e636f6d2e62723a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f35392043464e6574776f726b2f313430342e302e352044617277696e2f32322e332e300d0a4163636570742d4c616e67756167653a2070742d42522c70743b713d302e390d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
2024-02-06 13:31:00  INFO: [T25b8a6aa: osmand > 177.27.18.75] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-02-06 13:31:00  INFO: [T25b8a6aa] id: 27231906, time: 2024-02-06 13:31:00, lat: -22.72974, lon: -43.45530, speed: 7.0, course: 236.6, accuracy: 8.1
2024-02-06 13:31:00  INFO: [Ted94abe9: h02 < 177.79.118.255] 2a48512c373032383836363438332c56312c3135303430372c412c323233302e333432342c532c30343333312e323133382c572c3031372e31382c3131352c3036303232342c46424646444646462c3732342c31312c35373032342c31363930383735343123
2024-02-06 13:31:00  INFO: [Ted94abe9: h02 > 177.79.118.255] 2a48512c373032383836363438332c56342c56312c323032343032303631363331303023
2024-02-06 13:31:00  INFO: [Ted94abe9] id: 7028866483, time: 2024-02-06 12:04:07, lat: -22.50571, lon: -43.52023, speed: 17.2, course: 115.0
2024-02-06 13:31:00  INFO: [T10bb71bb: h02 < 177.79.113.199] 2a48512c373032383833363531352c56312c3136333035392c412c323234392e313738352c532c30343331382e373138392c572c3031312e32342c3236302c3036303232342c46464646444646462c3732342c31312c35323532312c31353633313539303623
2024-02-06 13:31:00  INFO: [T10bb71bb: h02 > 177.79.113.199] 2a48512c373032383833363531352c56342c56312c323032343032303631363331303023
2024-02-06 13:31:00  INFO: [T10bb71bb] id: 7028836515, time: 2024-02-06 13:30:59, lat: -22.81964, lon: -43.31198, speed: 11.2, course: 260.0
2024-02-06 13:31:00  INFO: [Taa349d02: h02 < 177.25.179.227] 2a48512c373032383836373734392c56312c3135313933332c412c323231372e383038382c532c30343335322e313133372c572c3032372e37342c3239382c3036303232342c46424646444646462c3732342c31312c35373032342c31363932313835383323
2024-02-06 13:31:00  INFO: [Taa349d02: h02 > 177.25.179.227] 2a48512c373032383836373734392c56342c56312c323032343032303631363331303023
2024-02-06 13:31:00  INFO: [Taa349d02] id: 7028867749, time: 2024-02-06 12:19:33, lat: -22.29681, lon: -43.86856, speed: 27.7, course: 298.0
2024-02-06 13:31:01  INFO: [T25b8a6aa: osmand < 177.27.18.75] 504f5354202f3f69643d32373233313930362674696d657374616d703d31373037323337303631266c61743d2d32322e373239373634266c6f6e3d2d34332e3435353332392673706565643d382e3034383330353231353439393937332662656172696e673d3233362e3632393838323831323526616c7469747564653d32352e34363833343136353431363635382661636375726163793d372e36393336383136303035373834383126626174743d363320485454502f312e310d0a486f73743a2073696c766572666f78736f6c7574696f6e732e636f6d2e62723a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f35392043464e6574776f726b2f313430342e302e352044617277696e2f32322e332e300d0a4163636570742d4c616e67756167653a2070742d42522c70743b713d302e390d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
2024-02-06 13:31:01  INFO: [T25b8a6aa: osmand > 177.27.18.75] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-02-06 13:31:01  INFO: [T25b8a6aa] id: 27231906, time: 2024-02-06 13:31:01, lat: -22.72976, lon: -43.45533, speed: 8.0, course: 236.6, accuracy: 7.7
Anton Tananaev 2 years ago

In the logs I see that the time matches the server. Are you seeing different time somewhere?

Antonio Junior 2 years ago

Yes Anton, I noticed that there is a device with a different time than the server, would that be it? the server is 2024-02-06 13:31:00 and the device is different, this would be 7028867749, time: 2024-02-06 12:19:33,

2024-02-06 13:31:00  INFO: [Taa349d02] id: 7028867749, time: 2024-02-06 12:19:33, lat: -22.29681, lon: -43.86856, speed: 27.7, course: 298.0
Antonio Junior 2 years ago

Thanks Anton, I'll check if there's more and update the time.

Anton Tananaev 2 years ago

If you still have a problem, I strongly recommend to focus on one thing at a time instead of looking at all different protocols. You mentioned H02 first then you asked about Traccar Client and then again about H02.

Antonio Junior 2 years ago

Sorry Anton, it's desperation in the search for a solution to the problem, I took your guidance. Thanks!