2016-11-21 82 views

回答

2
NSString *[email protected]"2016-11-21T11:04:02"; 

NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init]; 
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"]; 
NSDate* date = [dateFormatter dateFromString:serverTimeString];