8小时时差问题

//[NSDate date]获取的是GMT时间,下面获得某个时区的系统时间
+(NSDate *)getNowDateFromatAnDate:(NSDate *)anyDate{
NSTimeZone *zone = [NSTimeZone systemTimeZone];
NSInteger interval = [zone secondsFromGMTForDate: anyDate];
NSDate *localeDate = [anyDate dateByAddingTimeInterval: interval];
return localeDate;
}

你可能感兴趣的:(8小时时差问题)