aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndrii <a.ilkiv.ye@gmail.com>2024-11-05 06:56:04 +0200
committerAndrii Ilkiv <a.ilkiv.ye@gmail.com>2024-11-05 19:56:41 +0200
commit1ab1bbdda29d52e6045faa941762def7eb2fee6c (patch)
tree2faea8294c8ec237500db8da1c1dd96b383dcde5 /lib
parent4a44d6a6774d79a8c91cab5f94acafa271b6d4d6 (diff)
downloadnextcloud-server-1ab1bbdda29d52e6045faa941762def7eb2fee6c.tar.gz
nextcloud-server-1ab1bbdda29d52e6045faa941762def7eb2fee6c.zip
fix: Getting default timezone for local time
Signed-off-by: Andrii Ilkiv <a.ilkiv.ye@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php b/lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php
index a5d911a03b1..b51ade4d74d 100644
--- a/lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php
+++ b/lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php
@@ -35,7 +35,7 @@ class LocalTimeProvider implements IProvider {
$targetUserId = $entry->getProperty('UID');
$targetUser = $this->userManager->get($targetUserId);
if (!empty($targetUser)) {
- $timezone = $this->config->getUserValue($targetUser->getUID(), 'core', 'timezone') ?: date_default_timezone_get();
+ $timezone = $this->config->getUserValue($targetUser->getUID(), 'core', 'timezone') ?: $this->config->getSystemValueString('default_timezone', 'UTC');
$dateTimeZone = new \DateTimeZone($timezone);
$localTime = $this->dateTimeFormatter->formatTime($this->timeFactory->getDateTime(), 'short', $dateTimeZone);