# Milliseconds issue, how convert 00h to 24, 01h to 25, 02h to 26..?

I have a LWC component that is a calendar, he verify the begin and end time of the company to put the interval of this hours, the problem is, when the hour is 00 or 01 or 02.. because of the way that was made. He considered only the hour ignoring the minutes and the method is like this:

`````` getFirstHour(milliBegin) {
let hour = milliBegin / 1000 / 60 / 60;
return (Number.isInteger(hour) ? milliBegin : (parseInt(hour) * 60 * 60 * 1000));
}
``````

At first, he send the milliseconds value so imagine:

• 23h = 82800000 (RIGHT!! It works) (CORRECT: 23 * 60 * 60 * 1000)
• 00h = 0 (the right value should be: 86400000) (WRONG: 00 * 60 * 60 * 1000/CORRECT: 24 * 60 * 60 * 1000)
• 01h = 3600000 (the right value should be: 90000000) (WRONG: 01 * 60 * 60 * 1000/CORRECT: 25 * 60 * 60 * 1000)

When I put this right values, before the getFirstHour method be called, it works, because I put this ifs statements:

``````if(this.dealer.BusinessHourEnd__c == 0){