DateTimeImmutable::setTimestamp Define a data e o horário com base em um timestamp Unix &reftitle.description; #[\NoDiscard] public DateTimeImmutableDateTimeImmutable::setTimestamp inttimestamp Retorna um novo objeto DateTimeImmutable construído a partir do antigo, com a data e o horário configurados com base em um timestamp Unix. &reftitle.parameters; timestamp Timestamp Unix representando a data e horário. Configurar timestamps fora dos limites de &integer; é possível usando DateTimeImmutable::modify com o formato @. &reftitle.returnvalues; &date.datetimeimmutable.return.modifiedobject; &reftitle.examples; Exemplo da função <function>DateTimeImmutable::setTimestamp</function> &style.oop; format('U = Y-m-d H:i:s') . "\n"; $newDate = $date->setTimestamp(1171502725); echo $newDate->format('U = Y-m-d H:i:s') . "\n"; ]]> &example.outputs.similar; &reftitle.seealso; DateTimeImmutable::getTimestamp