respect users timezone in statistic widgets (#1207)

This commit is contained in:
Kevin Papst
2019-10-31 00:17:31 +01:00
committed by GitHub
parent 4331a7c9f4
commit 8eec97deb5
5 changed files with 16 additions and 23 deletions

View File

@@ -256,14 +256,16 @@ class User extends BaseUser implements UserInterface
return null;
}
/**
* @return string
*/
public function getLocale(): string
{
return $this->getPreferenceValue(UserPreference::LOCALE, User::DEFAULT_LANGUAGE);
}
public function getTimezone(): string
{
return $this->getPreferenceValue(UserPreference::TIMEZONE, date_default_timezone_get());
}
/**
* @param string $name
* @param mixed $default