Hi,
as the title already says I'm getting wrong time & date from Client running on an old Android phone.
I'm using an old Samsung S3 Mini running Android 4.1.2 "Jelly Bean" running the Traccar Client v6.17.
Date and time on the phone is adjusted correct, also the client app shows the correct timestamp.
The GPS location is transferred propperly to demo servers, but the date is 2003-02-15, and time is shifted by 1h.
Time & date on the phone, either synced to the netzwork or manually adjusted, is not changing the transferred deviceTime at all.
Within the client app, the time is shown properly and related to the phone's setting, but on the server the wrong information shows up.
Since I'm having the same issue on two phones (both S3 mini with stock FW running) it seems not to be an individual issue.
Any idea, where the client could take the wrong date- & timestamp from, if it differs from the phone's settings?
Thanks for the quick reply.
As a workaround you can configure to override device time with the server time.
This will only work on server side, right? Since I don't have an own server running, this will not work for me.
Since this is an known issue which will happen to several elder devices, isn't there a way to "force" the client to send local smartphone time instead of GPS time to the server?
I guess it makes sense to have some check. Feel free to contribute the change or create a ticket.
Ok, I managed to find a solution which works for me - don't know if this will be suitable for other timezone or devices, but maybe it is ;)
- Calculated the missing milliseconds due to the GPS rollover which happened on April 6, 2019.
- Came out with an offset of 619315200000ms which has to be added to the device-calculated GPS time.
- Added this offset to the sourcecode at line 40 of "Position.kt" where the time is calculated
time = Date(location.time + 619315200000),
So from now on my old smartphones are reporting the corrected time to the server. Works fine so far!
Hi,
as the title already says I'm getting wrong time & date from Client running on an old Android phone.
I'm using an old Samsung S3 Mini running Android 4.1.2 "Jelly Bean" running the Traccar Client v6.17.
Date and time on the phone is adjusted correct, also the client app shows the correct timestamp.
The GPS location is transferred propperly to demo servers, but the date is 2003-02-15, and time is shifted by 1h.
Time & date on the phone, either synced to the netzwork or manually adjusted, is not changing the transferred deviceTime at all.
Within the client app, the time is shown properly and related to the phone's setting, but on the server the wrong information shows up.
Since I'm having the same issue on two phones (both S3 mini with stock FW running) it seems not to be an individual issue.
Any idea, where the client could take the wrong date- & timestamp from, if it differs from the phone's settings?