You are here

public function User::getTimeZone in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User::getTimeZone()

Returns the timezone of this account.

Return value

string Name of the timezone.

Overrides AccountInterface::getTimeZone

File

core/modules/user/src/Entity/User.php, line 319

Class

User
Defines the user entity class.

Namespace

Drupal\user\Entity

Code

public function getTimeZone() {
  return $this
    ->get('timezone')->value;
}