iOS“真实"离线时特定时区的时间 [英] iOS "real" time for specific TimeZone while offline

查看:96
本文介绍了iOS“真实"离线时特定时区的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是场景:

我正在编写一个与医疗相关的程序,它可以在没有连接的情况下使用.当某个动作发生时,程序会将时间写入 CoreData 记录.

I'm writing a medical related program, that would be use while with no connection. When some action act, the program would write the time to CoreData record.

这就是问题所在,如果他们的设备将时间设置为早于实际时间的差异时间.这将是一个大问题,因为它用于医疗用途.

That's the problem, if their device set the time to a diff time like earlier than the real time. That would be a big problem coz it's for medical usage.

  • 那么,即使没有连接,我如何才能获得实时"时间?
  • 或者,是否可以禁止用户使用限制或 DeviceProfile 之类的内容更改设备时间?

推荐答案

这只是因为 Apple 是他们声称在 1984 年与之抗争的老大哥.欢迎来到 1984!否则我们将可以访问实时时间和 ISO 日期格式的英文版本!:-/每个 iPwn 以及现在的其他设备都有 GPS 接收器和互联网功能,从中可以得出亚秒级的准确时间,但 Apple 坚持强迫我们依靠 AT&T 来自动设置我们的时钟.直到最近,AT&T 才开始提供准确的时间,感谢上帝的小恩惠.

It's only because Apple IS the Big Brother they claimed to be fighting in 1984. Welcome to 1984! Otherwise we would have access to real time time, and an English version of ISO date format! :-/ Every iPwn, and now other devices, has a GPS receiver and an Internet capability, from which sub-second accurate time could be derived, yet Apple insists on forcing us to depend on AT&T to automatically set our clocks. It's only recently that AT&T started delivering accurate time, thank god for small favors.

缺乏 GPS 和 NTP 时间设置,加上 ISO 8601 日期格式与其他美国格式和语言的明显遗漏,每天都非常烦人.

The lack of GPS and NTP time setting, plus the glaring omission of ISO 8601 date formatting with otherwise USA formats and language, is extremely annoying on a daily basis.

因此,您的问题的答案是,是的,这是可行的,但在 Apple 的监狱中不可行,因为您无法在不越狱的情况下从 GPS 或 NTP 设置 RTC.

So, the answer to your question is, Yes, it is feasible, but not in Apple's Jail, since you cannot set RTC from GPS or NTP without jail breaking.

PS:我的猜测是 AT&T 坚持这样做是为了通话时间或与向我们收取更多钱有关的愚蠢行为!;-)

PS: my guess is that AT&T insists on this for call-timing or something stupid that has to do with charging us more money! ;-)

这篇关于iOS“真实"离线时特定时区的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆