Fixed rounding time using not 5 minutes but using minutes from interval.

Hi, I fixed rounding time function (not 5 minutes strict, but using configuration). 
I would like to ask for accepting my little change into the main branch.

Thanks. Have a nice day. Jan Dvorak (CZ)