TimezoneTrait
Methods for modifying/reading timezone data.
Table of Contents
Methods
- setTimezone() : static
- Set the instance's timezone from a string or object
- timezone() : static
- Alias for setTimezone()
- tz() : static
- Alias for setTimezone()
Methods
setTimezone()
Set the instance's timezone from a string or object
public
setTimezone(DateTimeZone|string $value) : static
Parameters
- $value : DateTimeZone|string
-
The DateTimeZone object or timezone name to use.
Attributes
- #[ReturnTypeWillChange]
Return values
statictimezone()
Alias for setTimezone()
public
timezone(DateTimeZone|string $value) : static
Parameters
- $value : DateTimeZone|string
-
The DateTimeZone object or timezone name to use.
Return values
statictz()
Alias for setTimezone()
public
tz(DateTimeZone|string $value) : static
Parameters
- $value : DateTimeZone|string
-
The DateTimeZone object or timezone name to use.