inconsisten serverTime and deviceTime

Don2 years ago

After upgraded to Traccar 5.3, serverTime and deviceTime format returned from position API was inconsitency!

sometimes they presented as unix time seconds format but sometimes no, did I miss something?

{
  "position": {
    "id": 2147698135,
    "attributes": {
      "priority": 1,
      "sat": 14,
      "event": 239,
      "ignition": true,
      "motion": true,
      "rssi": 4,
      "io69": 1,
      "io113": 100,
      "io263": 1,
      "io31": 38,
      "io37": 5,
      "io251": 0,
      "io249": 0,
      "fuelConsumption": 1.17,
      "io15": 0,
      "io36": 448,
      "io42": 6063,
      "io43": 0,
      "io49": 11909,
      "tripOdometer": 0,
      "odometer": 101944000,
      "fuelUsed": 224.472,
      "vin": "MHFJW8EM7M2394284",
      "distance": 10.02,
      "totalDistance": 26721.89,
      "hours": 3263000
    },
    "deviceId": 134,
    "protocol": "teltonika",
    "serverTime": 1663378277602,
    "deviceTime": 1663248932000,
    "fixTime": 1663248932000,
    "outdated": false,
    "valid": true,
    "latitude": -6.1769233,
    "longitude": 106.99672,
    "altitude": 21.0,
    "speed": 4.859613,
    "course": 117.0,
    "address": null,
    "accuracy": 0.0,
    "network": null
  },
  "event": {
    "id": 256457859,
    "attributes": {},
    "deviceId": 134,
    "type": "ignitionOn",
    "eventTime": 1663248932000,
    "positionId": 2147698135,
    "geofenceId": 0,
    "maintenanceId": 0
  },
  "device": {
    "id": 134,
    "attributes": {
      "decoder.timezone": "Asia/Jakarta"
    },
    "groupId": 1,
    "name": "B 1957 DFD",
    "uniqueId": "359632106090555",
    "status": "online",
    "lastUpdate": 1663378277603,
    "positionId": 2147589454,
    "geofenceIds": null,
    "phone": "6281119008133",
    "model": "FMB001",
    "contact": "batavia-traccar",
    "category": "car",
    "disabled": false,
    "expirationTime": null
  }
}


{
  "position": {
    "id": 0,
    "attributes": {
      "priority": 0,
      "sat": 15,
      "event": 0,
      "ignition": true,
      "motion": true,
      "rssi": 5,
      "io69": 1,
      "io113": 88,
      "io263": 1,
      "io251": 0,
      "io249": 0,
      "fuelConsumption": 5.79,
      "io15": 1000,
      "tripOdometer": 49436,
      "odometer": 99053007,
      "fuelUsed": 2822.626,
      "distance": 1231.82,
      "totalDistance": 4242.28,
      "hours": 489000
    },
    "deviceId": 328,
    "protocol": "teltonika",
    "serverTime": "2022-09-17T08:41:49.994+07:00",
    "deviceTime": "2022-09-15T14:16:28+07:00",
    "fixTime": "2022-09-15T14:16:28+07:00",
    "outdated": false,
    "valid": true,
    "latitude": -7.4471483,
    "longitude": 112.7087249,
    "altitude": 30.0,
    "speed": 5.399570000000001,
    "course": 346.0,
    "address": null,
    "accuracy": 0.0,
    "network": null
  },
  "device": {
    "id": 328,
    "attributes": {
      "decoder.timezone": "Asia/Jakarta"
    },
    "groupId": 1,
    "name": "B 9606 SCI",
    "uniqueId": "359633100133953",
    "status": "online",
    "lastUpdate": "2022-09-17T08:41:49.995+07:00",
    "positionId": 2147583656,
    "geofenceIds": null,
    "phone": "+6281113110410",
    "model": "FMB920",
    "contact": "batavia-traccar",
    "category": "van",
    "disabled": false,
    "expirationTime": null
  }
}