Is there an alternative to ios-ntp to get atomic/ current time ios?

Viewed 1564

In my app I want to get the accurate date and time , Basically, in my application there is going to be a time sensitive portion that users can not start until after a certain time.

But if I go and grab the date and time from the device, the user can easily change the date and time on their device, Settings > General > Time & Date change it here.

I also tried with GPS locations time stamp but no luck, [CLLocation timeStamp] is also give device time,

I have searched all said to use ios-ntp, but it is not when user not have internet connection,

I have refer following StackOverflow questions:

but not getting result I want,

Is there other way to get accurate/ actual time ?

NOTE : ios have to store the currentdate some where , because when i change current system date from settings , and again set to Settings > General > Time & Date > set automatically > ON it will set the current accurate date, so can we get that date ?? or some trick ?

Example :

Suppose that In device right now time is 2014-01-01 15:04:57 +0000 ( right now set automatically is ON in Settings > General > Time & Date > set automatically > ON ), now
user set set automatically > OFF and change current dateto 2014-03-02 11:14:32 +0000

SO when in app i write NSLog(@"cdate: %@",[NSDate date]); it will print

cdate: 2014-03-02 11:14:32 +0000 but what i want is to print the current actual

date that is 2014-01-01 15:04:57 +0000

1 Answers
Related