我将TimeField
存储在Django中,我希望减去几分钟后再更新数据库。这就是我现在正在做的事情,结果是TpeError: unsupported operand type(s) for -: 'datetime.time' and 'datetime.timedelta'
>>> s.start_time
datetime.time(1, 0)
>>> from datetime import timedelta
>>> s.start_time - timedelta(minutes=30)
Traceback (most recent call last):
File "<console>", line 1, in <module>
TypeError: unsupported operand type(s) for -: 'datetime.time' and 'datetime.timedelta'
怎么了?