test function
from django.utils import timezone
def date_diff_now(date):
print(date)
print(timezone.now())
print(date - timezone.now())
print((date - timezone.now()).days)
Result
2018-02-07 17:46:36.442314+00:00
2018-02-07 17:47:32.084900+00:00
-1 day, 23:59:04.357374
-1
Why the difference between 2 datetime on the same day does not return 0 ?