Я настраиваю свой UILocalNotification, чтобы использовать часовой пояс по умолчанию, то есть тот, который находится в настройках iPhone, то есть время, которое появляется на часах iPhone, однако оно продолжает использовать зеленое время. Есть идеи?UILocalNotification не использует правильный часовой пояс
// Этот метод вызывается каждый раз, когда пользователь меняет дату события:
- (void)rescheduleNotification {
[[UIApplication sharedApplication] cancelAllLocalNotifications];
//create new one using interval
UILocalNotification *localNotification = [[UILocalNotification alloc]init];
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.fireDate = [self.currentSetting.lessonStartDate dateWithOffsetMinutes:[self.currentSetting.lessonRemindMinutes intValue]];
NSLog(@"locationNotificated scheduled for %@", localNotification.fireDate);
localNotification.repeatInterval = NSWeekCalendarUnit;
localNotification.alertAction = nil;
localNotification.alertBody = @"due to begin shortly";
localNotification.hasAction = YES;
localNotification.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
[localNotification release];
}
Нет, но он всегда печатает неподходящее время независимо от +0000 – TheLearner
Да, это правильно, поскольку он рассчитал время со смещением. – rckoenes