【发布时间】:2013-10-31 23:13:06
【问题描述】:
我个人没有遇到过这个问题,但是对于我的一些用户来说,设置一次的通知实际上是在一个小时后触发的。
这是我用来生成通知的代码:
UILocalNotification *notif = [[UILocalNotification alloc] init];
notif.fireDate = date;
notif.timeZone = [NSTimeZone defaultTimeZone];
notif.alertBody = @"Alert time!";
notif.alertAction = @"Wake me";
[[UIApplication sharedApplication] scheduleLocalNotification:notif];
相当标准。遇到问题的用户是英国时间,该时间有夏令时。我想知道这是否是某种 iOS 错误?
【问题讨论】:
-
当您从另一个变量分配
fireDate时,您可能无法存储时间...也许您将其保存在CoreData中? -
date等于什么?
标签: ios objective-c nsdate uilocalnotification nstimezone