iOS - LocationManager给newLocation时间戳错误

时间:2013-09-16 20:46:14

标签: iphone ios ios5 ios6 locationmanager

我只是想说我已经阅读了有关过滤旧位置等的所有内容,但这不是问题。我在真正的iPhone设备上测试我的应用时发现的是,当我更改设备中“设置”中的“日期和时间”时,我从locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation获得的新位置给了我相同的“日期” & time“就像我在我的iPhone设备中一样。

我需要根据网络时间获取实时时间戳,而不是手机的时间戳,因为那时我可以操纵数据。我到底该怎么做到这一点,我是否想念一些东西?

是的,我的位置管理员看起来像这样:

self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;

1 个答案:

答案 0 :(得分:0)

您将无法访问原始GPS数据(具有实时时间戳)。为什么不使用实际的ntp服务器?