public function valid_time($sTime, $sFormat)
    {
        //  If blank, then assume the date is not required
        if (empty($sTime)) {
            return true;
        }

        if (empty($sFormat)) {
            $sFormat = 'H:i:s';
        }

        if (!array_key_exists('valid_time', $this->_error_messages)) {
            $this->set_message('valid_time', lang('fv_valid_time_field'));
        }

        try {

            $oDate = \DateTime::createFromFormat($sFormat, $sTime);

            if (empty($oDate)) {
                return false;
            }

            return $oDate->format($sFormat) == $sTime;

        } catch (\Exception $e) {

            return false;
        }
    }