如何使用目标C在iOS中传输NSDate
到偏移时间格式(2015-08-05 16:33:29 +02:00)?
答案 0 :(得分:0)
尝试:
NSDate *date = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
[dateFormatter setDateFormat:@"yyyy'-'MM'-'dd HH':'mm':'ss ZZZ"];
NSLog(@"%@",[dateFormatter stringFromDate:date ]);