我正在安排这样的本地通知
+ (void) addLocalNotification: (Event *) event {
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.fireDate = event.scheduleTime;
localNotif.alertBody = @"Time to apply drops\nPlease press view to see details";
localNotif.soundName = ALARM_SOUND_FILE;
localNotif.timeZone = [NSTimeZone localTimeZone];
localNotif.applicationIconBadgeNumber = 1;
NSDictionary * dict = [NSDictionary dictionaryWithObjectsAndKeys:event.number,LN_EVENT_KEY, ACTION_EVENT, LN_ACTION_KEY, nil];
localNotif.userInfo = dict;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
}
然而,在上周末的时钟向前推进后,在时钟向前推进之前安排的通知会在一个小时后触发,即 19:00 而不是 18:00
苹果文档说要获得“挂钟”时间,如上所述设置时区。
欢迎任何建议。