我试图从 11 月 3 日开始添加像达拉斯这样的时区的一天,但我做不到。
NSDate *intime = @"2013-11-03 05:00:00 +0000";
NSDate *nextday= [NSDate dateWithTimeInterval:24*3600 sinceDate:intime];
NSDateFormatter *formatter=[[NSDateFormatter alloc]init];
[formatter setDateFormat:@"MM/dd/yyyy"];
NSString *convert=[formatter stringFromDate:nextday];
NSLog(@"convert:%@",convert);
nslog 值:
intime: 2013-11-03 05:00:00 +0000
nextday: 2013-11-04 05:00:00 +0000
convert: 11/03/2013 23:00:00 // but I need this 11/04/2013.
请告诉我,如何做到这一点,
提前致谢