NSDate *date = [NSDate date];NSTimeZone *zone = [NSTimeZone systemTimeZone];
NSInteger interval = [zone secondsFromGMTForDate: date];
NSDate *localeDate = [date dateByAddingTimeInterval: interval];
NSLog(@"enddate=%@",localeDate);
NSDate *date = [NSDate date];NSTimeZone *zone = [NSTimeZone systemTimeZone];
NSInteger interval = [zone secondsFromGMTForDate: date];
NSDate *localeDate = [date dateByAddingTimeInterval: interval];
NSLog(@"enddate=%@",localeDate);
本文标题:获取当地时间
本文链接:https://www.haomeiwen.com/subject/yruddttx.html
网友评论