function User::getTimeZone
Returns the timezone of this account.
Return value
string Name of the timezone.
Overrides AccountInterface::getTimeZone
1 call to User::getTimeZone()
- User::preSave in core/
modules/ user/ src/ Entity/ User.php - Acts on an entity before the presave hook is invoked.
File
-
core/
modules/ user/ src/ Entity/ User.php, line 349
Class
- User
- Defines the user entity class.
Namespace
Drupal\user\EntityCode
public function getTimeZone() {
return $this->get('timezone')->value;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.