//获取当前时间
NSDate *date=[NSDate new];
NSDateFormatter *formatter=[[NSDateFormatter alloc]init];
formatter setDateFormat:@"yyyy-MM-dd HHMMss"];
NSString *string=[formatter stringFromDate:date];
//获取当前时间戳的值NSTimeInterval interval = [[NSDate date] timeIntervalSince1970];
//时间戳的值转化为时间
NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:1498447255.454285];