获取系统当前时间:
NSDate *currentDate=[NSDate date];
NSDateFormatter *dateformatter=[[NSDateFormatter alloc]init];
[dateformatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"];
NSString *currentTime=[dateformatter stringFromDate:currentDate];
NSLog(@"currentTime:%@",currentTime);