1
NSString * last_modified = [NSString stringWithFormat:@"%@",[[(NSHTTPURLResponse *)response allHeaderFields] objectForKey:@"Last-Modified"]];

NSLog(@"Last-Modified: %@ ", last_modified );
NSString *dateString = @"Tue, 11 Dec 2012 13:22:57 GMT";

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEE, dd MMM yyyy HH:mm:ss zzz"];

NSDate *date = [dateFormatter dateFromString:dateString];
NSLog(@"date:%@",date);

此处显示的日期时间与当前印度时间不相等。请给我一个建议

谢谢, 维贾扬

4

1 回答 1

0

时间是格林威治标准时间

将其转换为本地时setTimeZoneNSDateFormatter

于 2012-12-12T06:32:41.723 回答