<?php
/**
 * Created by PhpStorm.
 * User: sunmoon<i@liming.me>
 * Date: 2019/07/29
 * Time: 上午9:39
 */

namespace common\libs\logging\operate\valueType;

class DateTime extends AbstractValueType {

    public $format = 'Y-m-d H:i:s';

    public function result(){
        $value = $this->getValue();
        if(!$value){
            return $this->defaultText;
        }
        return date($this->format, $value);
    }
}