On Fri, Dec 16, 2011 at 8:45 PM, Ulrich Eckhardt <ulrich.eckha...@dominolaser.com> wrote: > I'm trying to create a struct_time that is e.g. one year ahead or a month > back in order to test some parsing/formatting code with different dates.
Do you need it to be one exact calendar year, or would it make sense to add/subtract integers from a Unix time? t = time.time() + 365*86400 # Not actually a year ahead, it's 365 days ahead t = time.localtime(t) # if you want a struct_time ChrisA -- http://mail.python.org/mailman/listinfo/python-list