Nsdating ca

Rated 4.92/5 based on 855 customer reviews

I want to be able to store the timestamps in my SQL, then just compare the differences between the stored server timestamp and the current server timestamp.I would prefer to not have to use a web request to get the "server time" everytime I need to do a comparison if possible.For example, the absolute time -32940326 is equivalent to December 16th, 1999 at .

call it consecutively and you might not end up with an increasing sequence)CACurrent Media Time: 1.33 µs/call gettimeofday: 1.38 µs/call [NSDate time Interval Since Reference Date]: 1.45 µs/call CFAbsolute Time Get Current: 1.48 µs/call [[NSDate date] time Interval Since1970]: 4.93 µs/call CACurrent Media Time: 1.25 µs/call gettimeofday: 1.33 µs/call CFAbsolute Time Get Current: 1.34 µs/call [NSDate time Interval Since Reference Date]: 1.37 µs/call [[NSDate date] time Interval Since1970]: 3.47 µs/call I like this too since it's very portable.

@James Hickman I'm not very sure about the daylight savings. If you have control over the date Format you can include the time Zone info like 0700 or 0000 to your date Format for more flexibility.

This post will be a good pointer stackoverflow.com/a/6866992/767730Ok, from what I gather it seems that UTC is not affected by any daylight savings time or other seasonal changes.

Fortunately, I only need to show the difference in terms of time between any 2 dates in my app, so I don't need to display exact time for every timezone.

and had the API provide a number of seconds since January 1 1970, GMT.

Leave a Reply