I'm having this issue where the correct time is passed but once it hits the [formatter setDateFormat:date]
it comes out in a different time zone. Here is a snippet
NSDate* date = user.startDate;
NSDateFormatter *format = [[NSDateFormatter alloc] init];
NSLog(@"-------> (1) time is %@", date);
NSLog(@"-------> (2) time is %@", date);
[format setDateFormat:@"h:mm a"];
NSLog(@"-------> (3) time is %@", date);
NSLog(@"-------> (4) time is %@", [format stringFromDate:date]);
Here is the debugger output for the log messages
-------> (1) time is 2016-06-30 09:25:17 +0000
-------> (2) time is 2016-06-30 09:25:17 +0000
-------> (3) time is 2016-06-30 09:25:17 +0000
-------> (4) time is 2:25 AM
I'm expecting the output for (4)
to be time is 9:25 AM