Device Time-->Server Time-->Fix Time Error Please Help

Bhanu From Nepal6 months ago

I am using Traccar Server in a VPS havping Timezone UTC +5:45 (Kathmandu) , Using Chines Devices Having GT06 Protocol. When I check device time and location from SMS command it shows correct data, but in a log it reports wrong data. In UI some devices shows correct time some not. And in a some device device time and fix times shows diffrent in UI. I am in puzzule from few days please help me to set fix time as server time and ingore device time if it is possiable please guide me.
How to set server time as fix time? I am using SQL Server 2019 Database in a Windows VPS Server. Or, any other solution for me.

Please Help .. Please Help ...Please Help

Anton Tananaev6 months ago

Make sure your device reports UTC time to the server. The the time should be correct.

Bhanu From Nepal6 months ago

Thanks a lots Anton for your quick responce. My devices use GMT time zone but time is accurate our server UTC time.
I need to fix the server time as fix time if it is possibale and not effect any report or any other area. Today, I found your replay on a topic with:

<entry key='time.override'>serverTime</entry>
<entry key='time.protocols'>osmand,gt06</entry>

and I add these lines on traccar.xml after restarting the server, It shows server time device time and fix time same for some devices but in some devices having same protocol shows diffrent time on web UI.

This log:

2024-05-28 08:17:59  INFO: [T0b9b68ae: gt06 > 36.252.129.8] 787805120047941f0d0a
2024-05-28 08:18:01  INFO: [Tc67ba7d8: osmand < 127.0.0.1] 504f5354202f3f69643d253230393835373035363039372674696d657374616d703d31373136353137343730266c61743d32372e34393731343539266c6f6e3d38332e3435313837322673706565643d302e302662656172696e673d302e3026616c7469747564653d36332e32303030303037363239333934352661636375726163793d31372e39333039393937353538353933373526626174743d34362e3020485454502f312e310d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f69642031333b20323230313131375449204275696c642f544b51312e3232313131342e303031290d0a4163636570742d456e636f64696e673a20677a69700d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a5669613a20312e312057494e2d4946464a3830363239364f0d0a582d466f727761726465642d466f723a203131332e3139392e3235312e3136370d0a582d466f727761726465642d50726f746f3a20687474700d0a582d466f727761726465642d486f73743a203130332e39302e38362e3137333a383038320d0a582d466f727761726465642d5365727665723a203130332e39302e38362e3137330d0a486f73743a206c6f63616c686f73743a353035350d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2024-05-28 08:18:01  WARN: Unknown device -  9857056097 (127.0.0.1)
2024-05-28 08:18:01  INFO: [Tc67ba7d8: osmand > 127.0.0.1] 485454502f312e31203430302042616420526571756573740d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-05-28 08:18:03  INFO: [Tc67ba7d8: osmand < 127.0.0.1] 504f5354202f3f69643d3134343830342674696d657374616d703d31373136313838333438266c61743d32372e36383931303634266c6f6e3d38332e343634313335312673706565643d302e302662656172696e673d302e3026616c7469747564653d3133302e363939393936393438323432322661636375726163793d31352e30303639393939363934383234323226626174743d33352e3020485454502f312e310d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f69642031333b20524d5833303835204275696c642f535031412e3231303831322e303136290d0a4163636570742d456e636f64696e673a20677a69700d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a5669613a20312e312057494e2d4946464a3830363239364f0d0a582d466f727761726465642d466f723a203130332e31302e32382e3136350d0a582d466f727761726465642d50726f746f3a20687474700d0a582d466f727761726465642d486f73743a203130332e39302e38362e3137333a383038320d0a582d466f727761726465642d5365727665723a203130332e39302e38362e3137330d0a486f73743a206c6f63616c686f73743a353035350d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2024-05-28 08:18:03  WARN: Unknown device - 144804 (127.0.0.1)
2024-05-28 08:18:03  INFO: [Tc67ba7d8: osmand > 127.0.0.1] 485454502f312e31203430302042616420526571756573740d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-05-28 08:18:03  INFO: [T9d3103a9: gt06 < 36.252.31.147] 78781f1218051c081016ca02f3cf9008f427aa00352101ad0259750058b90693b71d0d0a
2024-05-28 08:18:03  INFO: [Tc079f65c: gt06 < 49.126.44.236] 78780a1385040300021963590d0d0a
2024-05-28 08:18:03  WARN: Geocoding failed - HTTP 429 Too Many Requests - ClientErrorException (...)
2024-05-28 08:18:03  INFO: [T9d3103a9] id: 355488020118853, time: 2024-05-28 08:18:03, lat: 27.51823, lon: 83.45481, course: 289.0
2024-05-28 08:18:03  INFO: [T9d3103a9: gt06 > 36.252.31.147] 78780512069350660d0a
2024-05-28 08:18:04  WARN: Geocoding failed - HTTP 429 Too Many Requests - ClientErrorException (...)
2024-05-28 08:18:04  INFO: [Tc079f65c] id: 862608060001945, time: 2024-05-28 08:18:03, lat: 28.01835, lon: 83.29054, course: 217.0
2024-05-28 08:18:04  INFO: [Tc079f65c: gt06 > 49.126.44.236] 787805131963eb6c0d0a
2024-05-28 08:18:05  INFO: [T0ce2d348: gt06 < 49.126.179.10] 78780a13850403000200d2bf860d0a
2024-05-28 08:18:05  INFO: [T18917f3f: gt06 < 36.252.130.205] 78780a13870604000206cc1d980d0a
2024-05-28 08:18:05  INFO: [T18917f3f] id: 862608060003784, time: 2024-05-28 08:18:05, lat: 27.86945, lon: 83.54504, course: 0.0
2024-05-28 08:18:05  INFO: [T18917f3f: gt06 > 36.252.130.205] 7878051306cca0c80d0a
2024-05-28 08:18:05  WARN: Geocoding failed - HTTP 429 Too Many Requests - ClientErrorException (...)
2024-05-28 08:18:05  INFO: [T0ce2d348] id: 862608060003818, time: 2024-05-28 08:18:05, lat: 27.52494, lon: 83.43810, course: 0.0
2024-05-28 08:18:05  INFO: [T0ce2d348: gt06 > 49.126.179.10] 7878051300d20de70d0a
2024-05-28 08:18:06  INFO: [Tb157ebf0: gt06 < 36.252.205.55] 78781f1218051c08101ac802f36a9b08f42feb00352101ad0259750060570079440e0d0a
2024-05-28 08:18:06  INFO: [T295055d8: gt06 < 49.126.221.10] 78781f1218051c08101ac802f36c0608f42fb500347001ad0259750060570581ac410d0a
2024-05-28 08:18:07  WARN: Geocoding failed - HTTP 429 Too Many Requests - ClientErrorException (...)
2024-05-28 08:18:07  INFO: [Tb157ebf0] id: 355488020118134, time: 2024-05-28 08:18:06, lat: 27.50387, lon: 83.45599, course: 289.0
2024-05-28 08:18:07  INFO: [Tb157ebf0: gt06 > 36.252.205.55] 7878051200794ce20d0a
2024-05-28 08:18:07  WARN: Geocoding failed - HTTP 429 Too Many Requests - ClientErrorException (...)
2024-05-28 08:18:07  INFO: [T295055d8] id: 355488020118137, time: 2024-05-28 08:18:06, lat: 27.50407, lon: 83.45596, course: 112.0
2024-05-28 08:18:07  INFO: [T295055d8: gt06 > 49.126.221.10] 787805120581499d0d0a
2024-05-28 08:18:07  INFO: [Tb157ebf0: gt06 < 36.252.205.55] 78780a134500640001007ab9780d0a
Anton Tananaev6 months ago

What timezone do you have on the server and the client?

Bhanu From Nepal6 months ago

Server Time zone UTC +5:45 (Kathmadu) , and Client Time Zone Same as server . GT06 Devices having GMT +5:45 . In a above log:

2024-05-28 08:18:07  INFO: [T295055d8] id: 355488020118137, time: 2024-05-28 08:18:06, lat: 27.50407, lon: 83.45596, course: 112.0

This is correct time .

Anton Tananaev6 months ago

By client I mean your browser or mobile device.

Bhanu From Nepal6 months ago

GMT+0545 (Nepal Time)

Anton Tananaev6 months ago

OK, so the server and the client timezone is the same, you should see the same values in the app and in the logs.

Bhanu From Nepal6 months ago

Yes! In some case its correct data on my custom mobile app and traccar web UI, But In some devices when I check with SMS parameter it shows correct data on when it send data to the server diffrenct time . When I see in log its diffrent time than SMS replaied by device. After adding :

<entry key='time.override'>serverTime</entry>
<entry key='time.protocols'>osmand,gt06</entry>

I am geeting much accurate data in trip report.

Anton Tananaev6 months ago

Adding time override is not recommended. You should instead figure out the root cause for the issue.

Bhanu From Nepal6 months ago

Yes ! I got another error after override on playback and live view mess lines appers:

messsss.jpg

Bhanu From Nepal6 months ago

I cant understand please help. Device reporting correct time, server reporting correct time, our device and server in same time zone. Browser and mobile app aslo in same time zone. But , Fix time shows diffrent time. I have problem in Trip report due to this. When I used <entry key='time.override'>serverTime</entry>, <entry key='time.protocols'>osmand,gt06</entry> It prodcue accurate Trip Report but it create error on live view and playback.

Please Help Me !!!
time fix.png

Bhanu From Nepal6 months ago

How can I slove this Time problem ? Please someone help me . In gr8 Trouble.

Anton Tananaev6 months ago

First step - disable time override. Next - provide logs showing the problem. Make sure you include the full connection session from the word "connected". Session id is in square brackets.

Bhanu From Nepal6 months ago

I disable time override. I called device vender he suggest me to setup time zone as 0,0 so I configure the device GMT E +0,0 after doing this device report incorrect time in SMS Query , But I wonder how it is possiable in our traccar server web UI it shows correct time. I drive a car for test and shows correct time on trip report too.

Can I send log whole file as text file.