title: How to *change* a struct_time object?
body: <p>When dealing with times and dates in python, you will stumble across the time.struct_time object:</p>
  
  <pre><code>st = time.strptime("23.10.2012", "%d.%m.%Y")
  print st
  time.struct_time(tm_year=2012, tm_mon=10, tm_mday=23, tm_hour=0, tm_min=0,
                   tm_sec=0, tm_wday=1, tm_yday=297, tm_isdst=-1)
  </code></pre>
  
  <p>Now as this struct does not support item assignment (i.e. you cannot do something like <code>st[1]+=1</code>) how else is it possible to increase, say, the number of the month.</p>
  
  <p>Solutions suggest to convert this time_struct into seconds and add the corresponding number of seconds, but this does not look nice. You also need to know how many days are in a month, or if the year is a leap year or not. I want an easy way to obtain a time_struct to be e.g.</p>
  
  <pre><code>time.struct_time(tm_year=2012, tm_mon=11, tm_mday=23, tm_hour=0, tm_min=0,
                   tm_sec=0, tm_wday=1, tm_yday=297, tm_isdst=-1)
  </code></pre>
  
  <p>with just the month increased by one. Creating a <code>time_struct</code> from scratch would be fine—but how? What ways are there?</p>