server time & device time difference

sachin.terdale9 years ago

We see difference in server time and device time received data in traccar mysql database
Below given are the details

Server Time :2016-03-24 14:56:36
Device Time :2016-03-24 09:25:49

Device is in same time zone as server but we see device time different than server time.

We are testing the product with traccar and also in GPS Monitor.

We see proper data in Traccar but in GPS monitor the device time is shown.

Please advise on bellow.

  1. Does traccar use the server time to show position data or device time

  2. Do you handled timezone in traccar as in IST time zone we see current time apart from server or device time.
    IF yes how is the timezone is handled in traccar.

  3. How could the GPS monitor could be set to show timezone wise data. I know it is not related to traccar but let us know if any possible ways to handle it.

sachin.terdale9 years ago

We are using traccar hidden client app for testing

Anton Tananaev9 years ago

Which one is correct? Device or server?

  1. Traccar uses device time (actually fix time).
  2. Traccar always expect UTC time from devices and it stores time in UTC. Then it's converted to local time by browser.
  3. What is GPS monitor?
sachin.terdale9 years ago

hi, get details about gps monitor

http://keselj.xyz/index.php/gps-monitor/quick-start

it is a joomla interface for traccar.

Anton Tananaev9 years ago

GPS monitor is not an official Traccar project, so you need to contact author for support.

Fleetracker9 years ago

Hi Anton

I remarked the same issue when we switched to summer time in my country (GMT+1).
I configured trackers to GMT+1 timezone and also i changed this prameter in traccar server preference to GMT+1.

In mysql DB, "Time" field is correct = Time of tracker (GMT+1), but "Time server" field still GMT and also all timestamps in GUI, reports and Archive data are incorrect (GMT+2)

N.B: i use for GUI Litvak project.

Best regards

Anton Tananaev9 years ago

In the database all timestamps should be in UTC/GMT.

iluhis8 years ago

but the time is different in demo server. Timezone in my device is correct, but time in web interface is +3 from the device` time

Anton Tananaev8 years ago

What do you mean timezone is correct? Does it send UTC time?

iluhis8 years ago

i don`t know. This device is using gt06 protocol, timezone is set as +3 via SMS and it shows correct time when answering on SMS request, but on the site I see time which is 3 hours "in future" from my local time.

Site shows like "last refresh is 00:00", but in the "status" field it shows +3 from actual time, thus, when I`m trying to show location history on the map, I must add 3 hours forward from actual time I want to show.

p.s. I can explain it in Russian more correctly if needed.

Anton Tananaev8 years ago

As I said before, Traccar expects UTC time, so you need to configure your device to report time in UTC timezone.

Tasadduq Hussain7 years ago

I see difference in server time and device time received data in Traccar h2 database
Below given are the details:

Server Time :2017-09-17 18:43:36
Device Time :2017-09-17 13:43:36

I am using GPS Tracker device named TK102/TK102B.
I set the time using command "timezone12345 300" in tracker device and it's replay me correct date & time but time difference in Traccar web interface.

Log Sample is here:

2017-09-17 13:42:55 DEBUG: [F336683D: 5013 < 119.160.97.169] HEX: 2a48512c3836353230353033303533343932382c56312c3133343331312c412c333031342e31373834302c4e2c30373133342e30373635302c452c32372e35302c35372c3137303931372c4646464646424646230d0a
2017-09-17 13:42:55  INFO: [F336683D] id: 865205030534928, time: 2017-09-17 18:43:11, lat: 30.23631, lon: 71.56794, speed: 27.5, course: 57.0

Please guide me.
Best regards

Anton Tananaev7 years ago

Please create a new topic and provide all information including timezones.

Thiago Araújo6 years ago

Hi,
I am using traccar version 3.16 and I have the same issue.

Server and Device are set to the same time zone (UTC). I noticed that there is a small difference between devicetime and fixtime as can be seen in the list below:

id; protocol; deviceid; servertime; devicetime; fixtime; valid
73878480; "gt06"; 3606; "2018-06-06 12:38:44.876"; "2018-06-06 12:38:44.868"; "2018-06-06 12:00:50"; t
73873606; "gt06"; 3606; "2018-06-06 12:19:44.814"; "2018-06-06 12:19:44.802"; "2018-06-06 12:00:50"; t
73869134; "gt06"; 3606; "2018-06-06 12:00:59.629"; "2018-06-06 12:00:59.626"; "2018-06-06 12:00:30"; t
73869130; "gt06"; 3606; "2018-06-06 12:00:58.193"; "2018-06-06 12:00:58.189"; "2018-06-06 12:00:30"; t
73869149; "gt06"; 3606; "2018-06-06 12:01:02.902"; "2018-06-06 12:00:50"; "2018-06-06 12:00:50"; t

The strangest thing is that the web interface of Traccar does not show the latest real-time record. Only a few minutes or hours later the interface shows the updated value (even forcing a page refresh).

Can you help me to find out why?

Anton Tananaev6 years ago

Check the logs. Traccar shows what comes from the device. If there is a delay, it means that delay is on the device side.