Looks that time calculation of minuteOfDay isn't correct
time % 1 always = 0;
Probably should be:
// const minuteOfDay = this.minutesInDay * (time % 1); const minuteOfDay = time % this.minutesInDay;
Code sandbox:
https://codesandbox.io/p/sandbox/yxmnd7