http://hi.baidu.com/paulau/blog/item/22139b08cd6039930a7b82e4.html
http://www.crifan.com/python_time_not_support_timedelta_while_datetime_support/
>>> import time, datetime >>> d = datetime.datetime(*time.localtime()[:6]) >>> print d2007-09-04 10:10:00 >>> d + 15 Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for+: 'datetime.datetime' and 'int' >>> d datetime.datetime(2007, 9, 4, 10, 10) >>> t = datetime.timedelta(days=15) >>> d - tdatetime.datetime(2007, 8, 20, 10, 10) >>> x = d - t 这样就可以得到表示 15 天前的那个时间对象。