You are here

public function Carbon::setTimezone in Persian Date for Drupal 8 8.4

Set the instance's timezone from a string or object

Parameters

\DateTimeZone|string $value:

Return value

static

4 calls to Carbon::setTimezone()
Carbon::modify in src/Library/Carbon/Carbon.php
Consider the timezone when modifying the instance.
Carbon::timezone in src/Library/Carbon/Carbon.php
Alias for setTimezone()
Carbon::tz in src/Library/Carbon/Carbon.php
Alias for setTimezone()
Carbon::__set in src/Library/Carbon/Carbon.php
Set a part of the Carbon object

File

src/Library/Carbon/Carbon.php, line 944

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function setTimezone($value) {
  return parent::setTimezone(static::safeCreateDateTimeZone($value));
}