title: How do I modify a time_t timestamp in C?
body: <p>This is how we can store the current time and print it using <code>time.h</code> :</p>
  
  <pre><code>$ cat addt.c
  #include&lt;stdio.h&gt;
  #include&lt;time.h&gt;
  
  void print_time(time_t tt) {
      char buf[80];
      struct tm* st = localtime(&amp;tt);
      strftime(buf, 80, "%c", st);
      printf("%s\n", buf);
  }
  
  int main() {
      time_t t = time(NULL);
      print_time(t);
      return 0;
  }
  $ gcc addt.c -o addt
  $ ./addt
  Sat Nov  6 15:55:58 2010
  $
  </code></pre>
  
  <p>How can I add, for example 5 minutes 35 seconds to <code>time_t t</code> and store it back in <code>t</code>?</p>