Correct working hour calculation in resouce.py

Working hours were calculated wrong now includes minutes
Day calculation used and extra day because it was extended to 00:00:00 of next day

When using leaves there are rounding errors in the calculation of 0.1h per day. Not found yet

Fixes bug #3681