I am using this to set the time of uilocalnotifications. I want them to trigger at a certain time for whatever timezone the user lives.
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar] ;
NSDateComponents *components = [calendar components: NSUIntegerMax fromDate: date];
[components setHour: 7];
[components setMinute: 59];
[components setSecond: 17];
NSDate *newDate = [calendar dateFromComponents: components];
The minutes and seconds update correctly but the hour is always off. date is the original date passed and fire date is what I get when I attempt to set the time. The minutes and seconds are correct but the hour is off. Any clues?
date 2016-10-29 02:54:18 +0000
firedate 2016-10-28 14:59:17 +0000