获取当前时间12345NSDate *date = [NSDate date];NSDateFormatter *formatter = [[NSDateFormatter alloc] init];[formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];//获取当前时间日期展示字符串 如:2019-05-23-13:58:59NSString *str = [formatter stringFromDate:date];