Changes the current defined second to defined value.

@param  integer $second The new second value. If the value NULL is used it means: Use the second of NOW()
@return \Beluga\Date\DateTime
973739
public final function setSecond( int $second = null )
      : DateTime
   {

      if ( \is_null( $second ) )
      {
         $second = static::CurrentSecond();
      }

      return $this->setTimeParts( null, null, $second );

   }
959151
public function setTime( $hour, $minute, $second = 0, $microsecond = 0)
    {
        if( $this->isInfinity() ) {
            return $this;
        }
        $this->microseconds = $microsecond ? (int) $microsecond : 0;
        return parent::setTime( $hour, $minute, $second );
    }
560231
public function expiresIn( int $seconds ) : Token
	{
		if ( $seconds > 0 )
		{
			$this->expiry = new DateTimeImmutable( sprintf( '+%d seconds', $seconds ) );

			return $this;
		}

		throw (new InvalidExpiryInterval())->withSeconds( $seconds );
	}
739696
public function addSeconds($seconds)
    {
        $seconds = (float) $seconds;
        $interval = new DateInterval('PT' . abs($seconds) . 'S');

        if ($seconds < 0) {
            $interval->invert = 1;
        }

        return $this->add($interval);
    }
799531
public function on($first, $second)
    {
        return $this->raw(
            $this->builder->adapter()->quote($first) 
            . ' = ' .
            $this->builder->adapter()->quote($second)
        );
    }
922429
protected function dateTime(): DateTimeImmutable
    {
        if ($this->dateTime === null) {
            $year = $this->year();
            $month = $this->month();
            $day = $this->day();
            $hour = $this->hour();
            $minute = $this->minute();
            $second = $this->second();
            $timezone = $this->timezone()->toString();
            $this->dateTime = self::createNative($year, $month, $day, $hour, $minute, $second, $timezone);
        }

        return $this->dateTime;
    }
663971
public function setex($key, $seconds, $value) {
        return $this->returnCommand(['SETEX'], $key, [$key, $seconds, $value]);
    }
1194638
public function withSecond(int $second) : ZonedDateTime
    {
        return ZonedDateTime::of($this->localDateTime->withSecond($second), $this->timeZone);
    }
258174
protected function setValuesFromLdap($time)
    {
        if ($time == self::NEVER) {
            $this->setNever(true);
        } else {
            $seconds = $time / self::UNIT[self::SECONDS];

            $dtBase = new \DateTime('@0');
            $dtSeconds = new \DateTime('@' . $seconds);

            $this->setDays($dtBase->diff($dtSeconds)->format('%a'));
            $this->setHours($dtBase->diff($dtSeconds)->format('%h'));
            $this->setMinutes($dtBase->diff($dtSeconds)->format('%i'));
            $this->setSeconds($dtBase->diff($dtSeconds)->format('%s'));
        }
    }
1284843
public function now($interval = 0)
    {
        if ($interval) {
            $add = ' ' . ($interval > 0 ? '+' : '-') . ' INTERVAL ';
            $add .= $interval > 0 ? intval($interval) : intval($interval) * -1;
            $add .= ' SECOND';
        }

        return "now()" . $add;
    }
618283
public function bySeconds(int $seconds): Date
    {
        return $this->secondTo($this->originalDate->seconds() + $seconds);
    }
700069
public function twiceDaily($first = 1, $second = 13)
    {
        $hours = $first.','.$second;

        return $this->spliceIntoPosition(1, 0)
                    ->spliceIntoPosition(2, $hours);
    }
1158831
private function createDateWithNewTime(int $hour, int $minute, int $second): Date
    {
        return new Date($this->originalDate->handle()->setTime($hour, $minute, $second));
    }
45644
public static int second(EvaluationContext ctx, Object datetime) {
        return Conversions.toDateTime(datetime, ctx).getSecond();
    }
1345102
public function setTime($hour, $minute, $second = 0)
    {
        try {
            $this->getDateObject()->setTime($hour, $minute, $second);
        } catch (\Exception $e) {
            throw new DateTimeObjectException($e->getMessage());
        }

        return $this;
    }
1171749
public function withMinute(int $minute) : LocalTime
    {
        if ($minute === $this->minute) {
            return $this;
        }

        Field\MinuteOfHour::check($minute);

        return new LocalTime($this->hour, $minute, $this->second, $this->nano);
    }
473819
public function setTime($hour, $minute, $second = 0)
	{
		if ($this->datetime->setTime($hour, $minute, $second))
		{
			return $this;
		}

		return false;
	}