Skip to content

Commit

Permalink
chore: fixing the 5 min difference
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadtaimoor-deriv committed Dec 10, 2024
1 parent 016d010 commit 509349b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ const DayInput = ({
};
updateCurrentGmtTime();
const interval = setInterval(updateCurrentGmtTime, 1000);
// Adjusts end_time to match adjusted_start_time only if end_time is less than adjusted_start_time
// and the difference is exactly 5 minutes, ensuring time remains valid.
if (
end_time !== '' &&
timeToMinutes(end_time) < timeToMinutes(adjusted_start_time) &&
Math.abs(timeToMinutes(adjusted_start_time) - timeToMinutes(end_time)) === 5 &&
!open_timepicker
) {
Expand Down

0 comments on commit 509349b

Please sign in to comment.