How do I subtract two dates in Django/Python?

前端 未结 3 1866
我寻月下人不归
我寻月下人不归 2020-12-15 03:29

I\'m working on a little fitness tracker in order to teach myself Django. I want to graph my weight over time, so I\'ve decided to use the Python Google Charts Wrapper. Goog

3条回答
  •  春和景丽
    2020-12-15 03:54

    Note that subtracting will not work in case the two date times have different offset-awareness, e.g., one with tzinfo and one without (native).

提交回复
热议问题