当我尝试将 NSString 转换为 NSDate 时... setDateFormat 再给我 3 小时!
例子
NSDateFormatter *inFormat2 = [[NSDateFormatter alloc] init];
[inFormat2 setDateFormat:@"MM/dd/yyyy HH:mm:ss"]; //MM/dd/yyyy/
NSDate *seekLightStart = [inFormat2 dateFromString:@"01/01/2001 06:37:35"];
NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init];
[inputFormatter setDateFormat:@"yyyy-MM-dd 'at' HH:mm"];
NSDate *formatterDate = [inputFormatter dateFromString:@"1999-07-11 at 10:30"];
seekLightStart --> 01/01/2001 9:37:35 formatterDate ---> 07/11/1999 13:30
为什么 ??