[NSDate date]获取的是GMT时间,要想获得某个时区的时间,以下代码可以解决这个问题
NSDate *date = [NSDate date];
NSTimeZone *zone = [NSTimeZone systemTimeZone];
NSInteger interval = [zone secondsFromGMTForDate: date];
NSDate *localeDate = [date dateByAddingTimeInterval: interval];
NSLog(@"%@", localeDate);