diff --git a/source/easymacro2.py b/source/easymacro2.py index 15b4b89..9690f3e 100644 --- a/source/easymacro2.py +++ b/source/easymacro2.py @@ -1104,15 +1104,9 @@ class LOCalcRange(object): @property def time(self): - value = self.obj.Value - int(self.obj.Value) - h = 24 * value - hours = int(h) - m = round((h - hours) * 60, 6) - minutes = int(m) - s = (m - minutes) * 60 - seconds = int(s) - ms = int(round((s - seconds), 6) * 1_000_000) - time = datetime.time(hours, minutes, seconds, ms) + seconds = self.obj.Value * SECONDS_DAY + time_delta = datetime.timedelta(seconds=seconds) + time = (datetime.datetime.min + time_delta).time() return time @property