Check if system time is auto or user set

孤街醉人 提交于 2019-12-03 16:50:56

Just wanted to post my solution, incase some one else has the same issue.

After much research i found that getting GPS time of time setting info was not possible.

This solution isn't perfect nor real time but works for my purpose.

I have implemented a time check using cloud time each time the app comes on line. When the device re-establishes a server connection to sync events created off line i have put a verification that takes the last object device time and the new object device time and calculates the elapsed time between the two. (using NSdates so that daylight savings is covered) then do the same with the last available server time and the most recent server time. I then compare the results and if they are not within my margin of error the events are marked as invalid.

Hope that makes sense and is helpful for others.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!