You can use datefmt_localtime to convert a user's time string, input using their locale's script, into standard numbers for checking, using a simple HTML input element.
This avoids using clunky HTML select elements formatted with hour and minute options in the locale's script to capture user input.
<?php
$sLocale = 'en-us'; $sLocale = 'ar-ye'; $oIDF = datefmt_create($sLocale, IntlDateFormatter::NONE, IntlDateFormatter::SHORT);
$sTime = datefmt_format($oIDF, ['tm_hour'=>15, 'tm_min'=>25]);
$nPosition = 0;
$aTime = datefmt_localtime($oIDF, $sTime, $nPosition);
if($nPosition = -1){
...
}else{
...
}
?>