摘要: 1 NSDate 使用 ios时间的秒数 2 3 取当前时间的秒数 4 NSTimeInterval time = [[NSDate date] timeIntervalSince1970]; 5 long long int date = (long long int)time; 6 NSLog(@”date\n%d”, date); //1295322949 7 //把秒数转化成yyyy-MM-dd hh:mm:ss格式 8 NSDate *dd = [NSDate dateWithTimeIntervalSince1970:date]; 9 NSLog(@”d:%@”,dd); //2.. 阅读全文
posted @ 2014-01-20 19:57 wangzhenxiang 阅读(460) 评论(0) 推荐(0) 编辑