获取系统时间
- (NSString *)currentTime
{
NSDate * senddate=[NSDate date];NSDateFormatter *dateformatter=[[NSDateFormatter alloc] init];[dateformatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];NSString * locationString=[dateformatter stringFromDate:senddate];NSLog(@"locationString:%@",locationString);return locationString;复制代码
}