'Find timedelta difference with DST hours (Python)

Given two datetimes such as 2020-01-01 00:00:00 and 2020-04-01 00:00:00, I want to get the timedelta between the two dates in terms of number of hours with any addition/subtraction due to daylight saving time. I am not sure how I can proceed.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source