I am using NSDate to get the NSTimeInterval according to current time zone. But I'm getting information related to UTC. I'm using methods like "dateWithTimeIntervalSinceNow" and "dateWithTimeIntervalSince1970" How can I get time interval as per my time zone?
Asked
Active
Viewed 1,588 times
2 Answers
0
This has been answered in a fair bit of detail here.
How to convert time to the time zone of the iPhone device?
You might also want to check this out

Community
- 1
- 1

Manish Burman
- 3,069
- 2
- 30
- 35
-1
If both are NSDates then you could do :
//calculate the time difference in seconds, that is absolute and does not depend in time zones :)
double timeDiffInSecs = [date1 timeIntervalSince1970] - [date2 timeIntervalSince1970];

nacho4d
- 43,720
- 45
- 157
- 240
-
I just want current time interval for current time zone and not UTC – Satyam Aug 18 '11 at 06:59