|
DateTimeImmutable::setTimezoneSets the time zone Description
#[\NoDiscard]
public DateTimeImmutable DateTimeImmutable::setTimezone(DateTimeZone
$timezone)Returns a new DateTimeImmutable object with a new timezone set. Parameters
Return ValuesReturns a new modified DateTimeImmutable object for method chaining. The underlaying point-in-time is not changed when calling this method. ExamplesExample #1 DateTimeImmutable::setTimeZone example Object-oriented style The above examples will output: 2000-01-01 00:00:00+12:00 2000-01-01 01:45:00+13:45 See Also
|