I am trying to calculate time between one date and another and give result in hours rounding up hours.
I tried just substracting, both dates are datetime total_hours = self.valid_until - self.started_at
the result is timedelta.
I tried this one but it seems like it is viable for datetime field only
(total_hours.replace(second=0, microsecond=0, minute=0, hour=total_hours.hour)
+timedelta(hours=total_hours.minute//30))