diff = reference_time - topic_time
hour = round((reference_time-topic_time) / datetime.timedelta(hours=1))
if reference_time = '2020-08-23 07:00:10' and topic_time = '2020-08-22 00:00:00', the 'diff' variable is:
days = 1
seconds = 25210
The 'hour' conversion code make the hour = 31, which seems incorrect. The max diff should be less than 24 hours in one day. How to calculate time diffs and convert to hours in this case?