Wrong time calculation

Hi,

I've got issue with wrong time calculation in app (sleeping time).

How can I fix it?

Between 23.39 and 6.01 is 6h 22m not 6h 6m.