当前时间加20分钟

2017-06-20  本文已影响4人  楠Y

NSDate *dates = [self.datePickerView date];

NSTimeInterval interval = 20 * 60;

NSDate *detea = [NSDate dateWithTimeInterval:interval sinceDate:dates];

NSDateFormatter  *dateformatter=[[NSDateFormatter alloc] init];

[dateformatter setDateFormat:@"yyyyMMddHHmm"];

NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"BeiJing"];

[dateformatter setTimeZone:timeZone];

NSString *  locationString=[dateformatter stringFromDate:detea];

return locationString;

上一篇 下一篇

猜你喜欢

热点阅读