NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
dateFormatter.dateFormat = @"EEE, dd MM yyyy HH:mm:ss VVVV";
NSDateFormatter *df1 = [[NSDateFormatter alloc] init];
[df1 setDateFormat:@"yyyy-MM-dd HH:mm:ss ZZZ"];
NSString *dateString = @"Mon, 29 Apr 2013 01:00:49 +0000";
NSDate *date1= [dateFormatter dateFromString:dateString];
NSString *localDateString = [df1 stringFromDate:date1];
NSLog(@"localDateString=%@", localDateString);
当我使用常量 dateString 值时,它会给出正确的输出。当我从 xml paring value 中给出输入时,dateString 返回 nil 值