Android Location getTime() Bug?
Not sure if this is a bug but it's not doing what I expect.
I have both GPS and Network location enabled. The first thing I do to decide which location to use is check the time of the location.
I have my phone set 10 minutes ahead. As a result this is the output of my debugging.
09-01 20:05:00.764: network. Elapsed Time: 42001. 开发者_运维百科 Date: Thu Sep 01 20:04:18 GMT+01:00 2011
09-01 20:05:00.764: gps. Elapsed Time: 607768. Date: Thu Sep 01 19:54:53 GMT+01:00 2011
It looks like Network location is using the system time, while GPS is using actual time.
Is there something I should be doing or am doing incorrectly or is this a bug?
Edit: I am using Motorola Droid hardware to test on if that helps.
GPS Time is an actual system of time measurement: http://en.wikipedia.org/wiki/GPS_time#Timekeeping. GPS time does not sync with UTC, so I wouldn't expect it to sync with the clock on your phone unless you set the phone clock to be the same as GPS Time.
精彩评论