packages/material-ui-lab/src/internal/pickers/time-utils.ts/convertToMeridiem
export const convertToMeridiem = <TDate>(
  time: TDate,
  meridiem: 'am' | 'pm',
  ampm: boolean,
  utils: MuiPickersAdapter<TDate>,
) => {
  const newHoursAmount = convertValueToMeridiem(utils.getHours(time), meridiem, ampm);
  return utils.setHours(time, newHoursAmount);
};