diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-11-09 14:23:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-09 14:23:45 +0100 |
commit | 8ff3f21f1d259429e093b8cf45708e6ed04a5f5b (patch) | |
tree | 43bcbf6346455d3394609cf24765c7ab71e3e511 /lib | |
parent | 2c00f1e917d07a77a4bdf656bea38085dcd11b21 (diff) | |
parent | 1ab1bbdda29d52e6045faa941762def7eb2fee6c (diff) | |
download | nextcloud-server-8ff3f21f1d259429e093b8cf45708e6ed04a5f5b.tar.gz nextcloud-server-8ff3f21f1d259429e093b8cf45708e6ed04a5f5b.zip |
Merge pull request #49087 from AIlkiv/getting-default-timezone-for-local-time
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Contacts/ContactsMenu/Providers/LocalTimeProvider.php | 2 |
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); |