title: NSDate hours are not correct after constructing date from components
body: <p>I'm trying to construct a date from two different dates.  When I break down both dates into their respective components and re-assemble them into the new date.. everything seems to be correct except the hours.  Im sure its something simple that has to do with the timezone or the NSGregorianCalendar, but I am new to iOS, and programming NSCalendar.  Im hoping someone will catch the simple mistake Im making.</p>
  
  <pre><code>//grab today's date so we can brek it down into components
  NSDate *todayDate = [NSDate date];
  
  NSLog(@"Todays Date: %@", todayDate);
  
  NSCalendar *gregorian = [[NSCalendar alloc]
                           initWithCalendarIdentifier:NSGregorianCalendar];
  
  //break down the stored date into components
  NSDateComponents *theTime = [gregorian components:(NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit) fromDate:storedIncorrectDate];
  
  NSLog(@"Incorrect Calendar Components %@", theTime);
  
  NSDateComponents *todayCalendarComponents = [gregorian components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:todayDate];
  
  NSInteger currentYear = [todayCalendarComponents year];
  
  NSLog(@"The Year: %i", currentYear);
  
  NSInteger currentMonth = [todayCalendarComponents month];
  
  NSLog(@"The Month: %i", currentMonth);
  
  NSInteger currentDay = [todayCalendarComponents day];
  
  NSLog(@"The Day: %i", currentDay);
  
  
  NSLog(@"Today's Calendar Components %@", todayCalendarComponents);
  
  
  NSInteger theHours = [theTime hour];
  
  NSLog(@"Hours: %i", theHours);
  
  NSInteger theMinutes = [theTime minute];
  
  NSLog(@"Minutes: %i", theMinutes);
  
  
  NSInteger theSeconds = [theTime second];
  
  NSLog(@"Seconds: %i", theSeconds);
  
  //build my new date and store it before we play the affirmation.
  NSDateComponents *components = [[NSDateComponents alloc] init];
  
  
  [components setHour:theHours];
  [components setMinute:theMinutes]; 
  [components setSecond:theSeconds]; 
  [components setYear:currentYear];
  [components setMonth:currentMonth];
  [components setDay:currentDay];
  [components setTimeZone:[NSTimeZone localTimeZone]];
  
  
  NSLog(@"The Components: %@", components);
  
  NSCalendar *updatedCal = [[NSCalendar alloc]
                            initWithCalendarIdentifier:NSGregorianCalendar];
  NSDate *revisedCorrectedDate = [updatedCal dateFromComponents:components]; 
  
  NSLog(@"The Hours: %i", theHours);
  
  NSLog(@"The New and Corrected Date: %@", revisedCorrectedDate);
  </code></pre>
  
  <p>The result of the log printing the revisedCorrectedDate shows everything correct that I set except the hours.  This has to be a simple fix.. I just don't see it.  Thank you in advance!</p>