I am developing using Eclipse targeting a Samsung Moment M900.8.0
running 2.1-update1. The value I get when I do a location.getTime is
WAY off what it should be when compared to the System time. The Lat
and Lon are reasonable, the time is crazy!  I have read and re-read
the documentation.  It is supposed to return a long UTC time.

               Location location =
locationManager.getLastKnownLocation("gps");
               String lat = String.valueOf((long)
location.getLatitude());
               String lon = String.valueOf((long)
location.getLongitude());
               String tim = String.format("%d", location.getTime());
               String tim2 = String.valueOf((long)
location.getTime());

System Time (tim2) = 1279766311579
GPS time (tim) = 316928601523679

It doesn't matter whether I use the format or the String.valueOf. I've
scoured the internet looking to see if anyone else has had this kind
of problem and have come up empty. I could use the System  Time but I
really want to know when the last fix actually occurred so I know if
it is stale.  I suppose it could be a hardware problem.  Am I missing
something?  Does anyone have any suggestions?  Is anyone else having
this issue?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to