\Cake\Chronos\TraitsTimezoneTrait

Methods for modifying/reading timezone data.

Summary

Methods
Properties
Constants
timezone()
tz()
setTimezone()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

timezone()

timezone(\DateTimeZone|string  $value) : static

Alias for setTimezone()

Parameters

\DateTimeZone|string $value

The DateTimeZone object or timezone name to use.

Returns

static

tz()

tz(\DateTimeZone|string  $value) : static

Alias for setTimezone()

Parameters

\DateTimeZone|string $value

The DateTimeZone object or timezone name to use.

Returns

static

setTimezone()

setTimezone(\DateTimeZone|string  $value) : static

Set the instance's timezone from a string or object

Parameters

\DateTimeZone|string $value

The DateTimeZone object or timezone name to use.

Returns

static