If your device is reporting UTC time, that's what we want. Don't need to change that part.
Make sure you check the login message to see if it includes any timezone other than UTC. If yes, you should be able to use gt06.timezone
to set it to UTC.
thank you. i checked logs and found this:
2023-11-23 16:17:28 INFO: [T266b0dec: gt06 < 83.123.62.79] 787811010351742101656249220314a10011c8ec0d0a
i guess there is a timezone info in this but i can't easily decode it. checked https://www.traccar.org/protocols/ there are multiple documents for gt06 protocol. don't know which one to read.
besides i tested gt06.timezone
first time i tried to fix this issue. but can check again. is this the correct form to add:
<entry key='gt06.timezone'>UTC</entry>
Sorry, actually I think it should be decoder.timezone
. You can either set it in the config or in the device attributes.
okay this is the result. first on is before applying attribute. second is after that. i restarted service.
id | servertime | devicetime | fixtime |
---|---|---|---|
12711006 | 2023-11-23 17:32:00.2060000 | 2023-11-23 14:01:59.0000000 | 2023-11-23 14:01:59.0000000 |
12711484 | 2023-11-23 17:39:02.7550000 | 2023-11-23 14:09:01.0000000 | 2023-11-23 14:09:01.0000000 |
screenshot |
I think I found an issue. I'll follow up a bit later.
thanks
i also checked the login packet section on this document here and it seems to match the length of packet on my second previous message (22 bytes), currently trying to understand how conversion works
This should fix the problem:
https://github.com/traccar/traccar/commit/c4d2cf73f5a66759f7940ba4c11ec63976c05367
thank you
im using docker. should i wait for the image to be pushed or do something else
Yes, unless you want to do your own build.
ok i wait. can you say when that might happen ?
I just started with Traccar recently, and a fix was provided for an issue I was having (Thanks Anton!). What I did that worked for me for testing asap was clone the Github repo, then installed gradle + default-jdk (Ubuntu 22.04) and ran "./gradlew assemble" in the root of the repo.
In the target folder was the output file tracker-server.jar.
I added this to my docker-compose.yml under the volumes section to override the image provided jar:
Worked instantly for me, which was a happy surprise since I have never done anything with gradle or java before and it just worked!
so i did what ADABman explained and then added configuration for decoder timezone in traccar.xml
like this:
<entry key='decoder.timezone'>0</entry>
and that fixed my issue :-)
thanks Anton
thanks ADABman
hello
i setup traccar with sqlserver database on a linux server using docker compose. we have devices that use gt06 protocol and all of them have timezone equal to
E,3,30
. the problem isdevicetime
andfixtime
values are behind the UTC datetime. i checked multiple topics regarding gt06 devices but couldn't figure out why my configurations are ignored.i tried to decode hex packet and found out device sends datetime in UTC:
17 > 23
0b > 11
17 > 23
0f > 15
0a > 10
08 > 8
things i applied to fix this (according to other topics):
GMT
,0
,UTC
,Asia/Tehran
)i didn't apply them altogether and made sure to restart service after each change. the issue is, nothing changes after setting these and values stay the same. im using latest docker image with tag
traccar:5
i appreciate if you could help me figure this out. i can provide more info if required.
service log:
position record on database: