Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gps returns one day ahead?

Tags:

android

gps

In my android app I read GPS data and GPS time. For some reason GPS returns tomorrow's date. Anybody knows why?

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

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

enter image description here

EDIT

I keep ALL times in UTC. This app being in production for 1 year - results I'm showing from 1hr ago and you can see they are UTC times. On a left - time reported by device and on a right - time from location service. I'm not confusing anything, those dates usually 1-2 seconds apart.

EDIT 2

See shot from my debugger from my phone!! Took 2 minutes ago (~10:10 AM CST)

enter image description here

like image 852
katit Avatar asked Jan 27 '12 15:01

katit


1 Answers

Here I gave posted the Solution for the above problem

Android : Samsung Galaxy Tabs and Android 2.2 Devices Showing GPS date 1 Day Advance from 1st jan 2012 In short use the NMEA Listener as an alternative

like image 182
Shashi kant Singh Avatar answered Nov 12 '22 08:11

Shashi kant Singh