Change algorit for get time from cell
This commit is contained in:
parent
524eb06749
commit
01dab4e416
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue