Reputation: 332
I am making an app that will fire a notification 30 minutes before an event. I calculate the NSDate and set the notification with this huge code: http://pastie.org/private/3n9z6c06i17i8h8giing
However, the notification never fires. Could anyone please help me?
Upvotes: 0
Views: 389
Reputation: 160
I see that you've set the notification.fireDate as:
[notification setFireDate:[NSDate dateWithTimeIntervalSinceNow:[remain second]]];
But, your notification.timeZone doesn't appear to be set, so you're relying on the default?
Even though, you have:
[parser setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:14400]];
Try using this instead:
notification.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:14400];
Upvotes: 1