source/Core/UtilsDate.php
protected function _setDefaultDateTimeValue($oObject, $sLocalDateFormat, $sLocalTimeFormat, $blOnlyDate)
    {
        $aDFormats = $this->_defineDateFormattingRules();
        $aTFormats = $this->_defineTimeFormattingRules();

        $sReturn = $aDFormats[$sLocalDateFormat][2];
        if (!$blOnlyDate) {
            $sReturn .= " " . $aTFormats[$sLocalTimeFormat][2];
        }

        if ($oObject instanceof \OxidEsales\Eshop\Core\Field) {
            $oObject->setValue(trim($sReturn));
        } else {
            $oObject->value = trim($sReturn);
        }
        // increasing(decreasing) field lenght
        $oObject->fldmax_length = strlen($oObject->value);
    }
protected function _setDefaultDateTimeValue($oObject, $sLocalDateFormat, $sLocalTimeFormat, $blOnlyDate)
    {
        $aDFormats = $this->_defineDateFormattingRules();
        $aTFormats = $this->_defineTimeFormattingRules();

        $sReturn = $aDFormats[$sLocalDateFormat][2];
        if (!$blOnlyDate) {
            $sReturn .= " " . $aTFormats[$sLocalTimeFormat][2];
        }

        if ($oObject instanceof \OxidEsales\Eshop\Core\Field) {
            $oObject->setValue(trim($sReturn));
        } else {
            $oObject->value = trim($sReturn);
        }
        // increasing(decreasing) field lenght
        $oObject->fldmax_length = strlen($oObject->value);
    }
protected function _setDefaultDateTimeValue ( $ oObject , $ sLocalDateFormat , $ sLocalTimeFormat , $ blOnlyDate ) { $ aDFormats = $ this -> _defineDateFormattingRules ( ) ; $ aTFormats = $ this -> _defineTimeFormattingRules ( ) ; $ sReturn = $ aDFormats [ $ sLocalDateFormat ] [ 2 ] ; if ( ! $ blOnlyDate ) { $ sReturn .= " " . $ aTFormats [ $ sLocalTimeFormat ] [ 2 ] ; } if ( $ oObject instanceof \ OxidEsales \ Eshop \ Core \ Field ) { $ oObject -> setValue ( trim ( $ sReturn ) ) ; } else { $ oObject -> value = trim ( $ sReturn ) ; } // increasing(decreasing) field lenght $ oObject -> fldmax_length = strlen ( $ oObject -> value ) ; }
Sets default date time value

@param object $oObject          date field object
@param string $sLocalDateFormat input format
@param string $sLocalTimeFormat local format
@param bool   $blOnlyDate       marker to format only date field (no time)
Sets default date time value