Set the value of LogDate / log_date
@param $value DateTime
@return Log
489708
public function setLogDate($value) : Log
    {
        $this->validateDate('LogDate', $value);

        if ($this->data['log_date'] !== $value) {
            $this->data['log_date'] = $value;
            $this->setModified('log_date');
        }

        return $this;
    }
523749
public function castToDateTime($value)
    {
        if (is_int($value)) {
            $dt = new \DateTime();
            $dt->setTimestamp($value);
        } else {
            $dt = new \DateTime($value);
        }

        return $dt;
    }
1186969
protected function _addLog($value)
    {
        if ($this->_maximumLog >= 0 && count($this->_log) >= $this->_maximumLog) {
            array_shift($this->_log);
        }

        $this->_log[] = $value;
    }
92455
public function setSecond( ?int $value = null ) : Time
   {

      if ( null === $value )
      {

         $this->_seconds = static::CurrentSecond();

         return $this;

      }

      $this->_seconds = (int)$value;

      if ( $this->_seconds < 0 )
      {
         $this->_seconds = 0;
      }

      if ( $this->_seconds > 59 )
      {
         $this->_seconds = 59;
      }

      return $this;

   }
221781
protected function prepareValue($value)
    {
        if ($this->hasMutator()) {
            return call_user_func($this->getMutator(), $value);
        } elseif ($value && $this->isElementOfDate() && $this->isDateCastable()) {
            $value = $this->castValueAsDateTime($value);
            if ($this instanceof Timestamp) {
                $value = $value->getTimestamp();
            }

            return $value;
        }

        if (! is_null($value)) {
            if ($this->isJsonCastable()) {
                return $this->castValueAsJson($value);
            } elseif ($this->isCommaCastable()) {
                return $this->castValueAsCommaSeparated($value);
            }
        }

        return $value;
    }
313548
public function dateTo(\DateTime $value)
    {
        $this->add(new Criterium(self::CRITERIUM_END_DATE, $value));

        return $this;
    }
588720
public static function castToDateTime($value)
    {
        if ($value instanceof \DateTime) {
            return clone $value;
        }
        if (is_numeric($value)) {
            $date = new \DateTime();
            $date->setTimestamp((int)$value);
        } elseif (is_string($value) || (is_object($value) && method_exists($value, '__toString'))) {
            $date = date_create((string)$value);
            if ($date === false) {
                $date = null;
            }
        } else {
            $date = null;
        }
        return $date;
    }
696948
public function setCoreManagerTimeFormat($value)
    {
        $this->setFieldName('manager_time_format');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1191726
public function formatDatetime($value)
	{
		return $this->getLocale()->dateFormatter->formatDateTime($this->normalizeDateValue($value), $this->dateFormat, $this->timeFormat);
	}
1305362
public function convertToDate($value) {

		foreach($this -> date_formats as $format) {

			if(false !== \DateTime :: createFromFormat($format, $value)) {

				$d = new DateTime($value);
				$d -> createFromFormat($format, $value);

				if($d && $d -> format($format) == $value) {

					$d -> saveFormat($format);
					return $d;
				}
			}
		}

		return $value;
	}
1026337
public function setAsDate($column, $value)
  {
    $this->set($column, $value ? date('Y-m-d H:i:s', strtotime($value)) : null);

    return $this;
  }
945929
private function createDateTime($value)
    {
        if ($value instanceof DateTime) {
            return $value;
        }
        if ($value instanceof \MongoDate) {
            $dateStr = date('Y-m-d H:i:s.'.$value->usec, $value->sec);
            return new DateTime($dateStr);
        }
        if (is_numeric($value)) {
            // Supports microseconds
            $value = (Float) $value;
            $usec = round(($value - (Integer) $value) * 1000000, 0);
            $dateStr = date('Y-m-d H:i:s.'.$usec, (Integer) $value);
            return new DateTime($dateStr);
        }
        return new DateTime((String) $value);
    }
1084634
public function setMinute( ?int $value = null ) : Time
   {

      if ( null === $value )
      {

         $this->_minutes = static::CurrentMinute();

         return $this;

      }

      $this->_minutes = (int)$value;

      if ( $this->_minutes < 0 )
      {
         $this->_minutes = 0;
      }

      if ( $this->_minutes > 59 )
      {
         $this->_minutes = 59;
      }

      return $this;

   }
1042172
public function dateFrom(\DateTime $value)
    {
        $this->add(new Criterium(self::CRITERIUM_START_DATE, $value));

        return $this;
    }
383295
public function setScope(?string $value) : Log
    {

        if ($this->data['scope'] !== $value) {
            $this->data['scope'] = $value;
            $this->setModified('scope');
        }

        return $this;
    }
1193405
public function setBirthdateM($value)
    {
        if ($value === null) {
            $this->parameters['birthdateM'] = null;
        } else {
            validators\Number::validate($value, 1, 12, 'Invalid birthdateM');
            $this->parameters['birthdateM'] = min(12, max(1, (int)$value));
        }
        return $this;
    }
462162
public function setBirthdateY($value)
    {
        if ($value === null) {
            $this->parameters['birthdateY'] = null;
        } else {
            $datetime = new \DateTime('now');
            $max = (int)$datetime->format('Y');
            validators\Number::validate($value, 1, $max, 'Invalid birthdateY');
            $this->parameters['birthdateY'] = min($max, max(1, (int)$value));
        }
        return $this;
    }