Gps back one day ahead?

In my Android app, I read GPS data and GPS time. For some reason, the GPS is coming back tomorrow. Does anyone know why?

I get this data: (it was always good). Error in 4.0.3 ?!

position.GPSTime = new Date(loc.getTime()); 

enter image description here

EDIT

I save ALL times in UTC. This application works for 1 year - I show the results from 1 hour ago, and you can see that they are UTC times. Left is the time indicated by the device, and right is the time from the location service. I don’t confuse anything, these dates are usually 1-2 seconds apart.

EDIT 2

See a snapshot from my debugger from my phone! Took 2 minutes ago (~ 10: 10 am CST)

enter image description here

+6
source share
2 answers

GPS time is expressed in Coordinated Universal Time . Estimated time is London time. You are confused with the local time, which is in the time zone, which is UTC for 1 day.

After significant troubleshooting and research, I came across this Google Code article. Problem 23937: GPS provider: android.location.Location.getTime () returns an incorrect UTC timestamp on 4.0.3 / Nexus S , which seems to describe the same symptoms.

+3
source

Here I posted a solution for the above problem

Android: Samsung Galaxy Tabs and Android 2.2 devices showing GPS date 1-day advance from January 1, 2012 In short, NMEA receiver as an alternative

+4
source

Source: https://habr.com/ru/post/907038/


All Articles