Search Results
DateTimeImmutable::setTimestamp (PHP 5 >= 5.5.0, PHP 7, PHP 8) DateTimeImmutable::setTimestamp — Sets the date and time based on a Unix timestamp
- createFromMutable
DateTimeImmutable::createFromMutable (PHP 5 >= 5.6.0, PHP...
- getLastErrors
DateTimeImmutable::getLastErrors (PHP 5 >= 5.5.0, PHP 7,...
- setISODate
Returns a new DateTimeImmutable object with the date set...
- setDate
Returns a new DateTimeImmutable object with the current date...
- Sub
DateTimeImmutable::add () - Returns a new object, with added...
- createFromFormat
Returns a new DateTimeImmutable object representing the date...
- Modify
DateTimeImmutable::modify (PHP 5 >= 5.5.0, PHP 7, PHP 8)...
- createFromMutable
DateTimeImmutable::setISODate — Sets the ISO date DateTimeImmutable::setTime — Sets the time DateTimeImmutable::setTimestamp — Sets the date and time based on a Unix timestamp DateTimeImmutable::setTimezone — Sets the time zone DateTimeImmutable::sub — Subtracts an amount of days, months, years, hours, minutes and seconds
Assigne la date et l'heure à l'aide d'un horodatage Unix. Comme DateTimeImmutable:: setTimestamp () mais fonctionne avec DateTime. La version procédurale prend un objet DateTime comme premier argument.
Calling setTimestamp on an already instantiated method On DateTime and DateTimeImmutable objects, the setTimestamp method accepts integer UNIX timestamp values. This approach also has the slight disadvantage of the first instantiation with the given/current time that get overridden from the setTimestamp call.
Oct 9, 2021 · The whole point of DateTimeImmutable as opposed to DateTime is that it's immutable - it can't be changed once created. If you call modify() you return a new object, but don't modify the existing one.
DateTimeImmutable::add DateTimeImmutable::__construct DateTimeImmutable::createFromFormat DateTimeImmutable::createFromInterface DateTimeImmutable::createFromMutable DateTimeImmutable::getLastErrors DateTimeImmutable::modify DateTimeImmutable::setDate DateTimeImmutable::setISODate DateTimeImmutable::__set_state DateTimeImmutable::setTimestamp
People also ask
What is a datetimeimmutable based on a Unix timestamp?
What is the difference between datetimeimmutable and datetimeimmutable?
Which method accepts integer Unix timestamp values?
What are datetime and datetimeimmutable classes?
Simple usage example of `DateTimeImmutable::setTimestamp ()`. The DateTimeImmutable::setTimestamp () function sets the date and time of a DateTimeImmutable object based on a Unix timestamp. It updates the object with the new date and time values.
