ios时间转换
光速之年
Talk is cheap. Show me the code
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ios日期格式转换
1、如何如何将一个字符串如“ 20110826134106”装化为任意的日期时间格式,下面列举两种类型: NSString* string = @"20110826134106"; NSDateFormatter *inputFormatter = [[[NSDateFormatter alloc] init] autorelease]; [inputFor转载 2015-06-07 20:34:32 · 725 阅读 · 0 评论 -
IOS 世界标准时间UTC /GMT 转为当前系统时区对应的时间
- (NSDate *)getNowDateFromatAnDate:(NSDate *)anyDate { //设置源日期时区 NSTimeZone* sourceTimeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"];//或GMT //设置转换后的目标日期时区 NSTimeZone* destin转载 2015-06-07 20:08:35 · 1156 阅读 · 0 评论 -
iOS-获取当前时间的年、月、日、时、分、秒
01 //获取当前时间 02 NSDate *now = [NSDate date]; 03 NSLog(@”now date is: %@”, now); 04 05 NSCalendar *calendar = [NSCalendar currentCalendar]; 06 NSUInteger unitFlags = NSYearCalendarUn原创 2015-05-02 13:03:33 · 1908 阅读 · 0 评论
分享