Q:

Adding 30 seconds to NSDate

How can I convert an NSDate to seconds? I need it in seconds so that I can added 30 secs to the date and then convert back to NSDate to schedule a local notification. Any better ways of doing that are welcome too.

A:

You can use dateByAddingTimeInterval and pass in the value as 30. This will return you an NSDate which will be 30 secs ahead.
NSDate *newDate = [previousDate dateByAddingTimeInterval:30];

