Search code examples
iphonensdatenstimeinterval

iPhone - Problem with NSDate to get time interval according to current time zone


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?


Solution

  • 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

    Using TimeZones