title: Countdown hours bug (NSDate and Objective-C)
body: <p>I have a little problem with my countdown, in fact everything works fine but the hours are not in the right format that is to say, it shows me this: </p>
  
  <blockquote>
    <p>03: 94: 20: 38</p>
  </blockquote>
  
  <p>but I 'it would appear to me the real countdown of the hours that is to say: </p>
  
  <blockquote>
    <p>03: 22: 20: 38</p>
  </blockquote>
  
  <p><br />
  My code :</p>
  
  <pre><code> - (void)updateCounter:(NSTimer *)tmr
  {
      self.dateContest.hidden = NO;
      NSTimeInterval iv = [self.date timeIntervalSinceNow];
      int d = iv / 86400;
      int h = iv / 3600; // My problem
      int m = (iv - h * 3600) / 60;
      int s = iv - h * 3600 - m * 60;
      self.dateContest.text = [NSString stringWithFormat:@"%02d:%02d:%02d:%02d", d, h, m, s];
      if (d + h + m + s &lt;= 0) {
          [tmr invalidate];
      }
  }
  </code></pre>