From 1ab1bbdda29d52e6045faa941762def7eb2fee6c Mon Sep 17 00:00:00 2001 From: Andrii Date: Tue, 5 Nov 2024 06:56:04 +0200 Subject: [PATCH] fix: Getting default timezone for local time Signed-off-by: Andrii Ilkiv --- .../Contacts/ContactsMenu/Providers/LocalTimeProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php b/lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php index a5d911a03b17d..b51ade4d74da3 100644 --- a/lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php +++ b/lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php @@ -35,7 +35,7 @@ public function process(IEntry $entry): void { $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);