I need to check if some date and now arent' different more than in 18 hours:
dt = parser.parse("some date 123") #working well
diff = datetime.datetime.now() - dt
print "datetime.datetime.now() - dt = %s" % diff # 31 days, 0:08:04.882498 -- correct
print "datetime.datetime.now() - dt seconds = %s" % diff.seconds # 484 -- too
(datetime.datetime.now() - dt).seconds / 3600) < 18 # returns True always
As you can see, even though the dates are different in 31 days, the amount of seconds if very little which doesn't allow me to calculate the amount of hours. Why is it so small? Should it be x * 60 * 60 * amount_of_days? And how can I do what I want?