From 153f357fcdb9a6fce87b0a42e63e964709d94183 Mon Sep 17 00:00:00 2001 From: Risiko <> Date: Sun, 17 Nov 2019 18:15:35 +0000 Subject: [PATCH] fix: time calculation with float git-svn-id: https://svn.fhem.de/fhem/trunk@20530 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/98_weekprofile.pm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 2d6c0f5e4..84fd28797 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 98_weekprofile: time calculation with float - bugfix: 98_weekprofile: HM-TC-IT-WM-W-EU with CCU - feature: 70_KODI: pad channel and channelgroup readings with zeros to improve alphabetical ordering diff --git a/fhem/FHEM/98_weekprofile.pm b/fhem/FHEM/98_weekprofile.pm index 853fc41ef..f336869d0 100644 --- a/fhem/FHEM/98_weekprofile.pm +++ b/fhem/FHEM/98_weekprofile.pm @@ -74,8 +74,8 @@ sub weekprofile_minutesToTime($) { my ($minutes) = @_; - my $hours = $minutes / 60; - $minutes = $minutes - $hours * 60; + my $hours = $minutes / 60.0; + $minutes = $minutes - $hours * 60.0; if (length($hours) eq 1){ $hours = "0$hours";