Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
根据 Android 文档,Location 的 getTime() 方法返回修复时间的 UTC,所以我的假设是,无论用户做什么——改变手机的时间或时区,都不会改变这个值,但这似乎不会在所有手机上都是如此。
我们尝试过的大多数手机都按预期运行,但有几个(都运行 Android 4.4.2)当夏令时适用时,例如 BST(英国夏令时),然后 Location.getTime() 返回值为 UTC- 1. (还有其他 4.4.2 设备的行为正确)。
这是已知问题吗?有什么解决办法吗?