Fr3nch13/CakePHP Utilities

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
static

timezone()

Alias for setTimezone()

public timezone(DateTimeZone|string $value) : static
Parameters
$value : DateTimeZone|string

The DateTimeZone object or timezone name to use.

Return values
static

tz()

Alias for setTimezone()

public tz(DateTimeZone|string $value) : static
Parameters
$value : DateTimeZone|string

The DateTimeZone object or timezone name to use.

Return values
static

        
On this page

Search results