Skip to content

Commit 5a5ed9d

Browse files
authored
Merge pull request #43225 from bembelimen/upmerges/2024-04-06
[5.1] Upmerges - 2024-04-06
2 parents 658c5be + a8a7d33 commit 5a5ed9d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

administrator/components/com_content/src/Event/Model/FeatureEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ public function __construct($name, array $arguments = [])
7171
}
7272

7373
/**
74-
* Set used parameter to true
74+
* Set abort and reason parameters.
7575
*
76-
* @param bool $value The value to set
76+
* @param string $reason Abort reason
7777
*
7878
* @return void
7979
*

administrator/components/com_users/src/Model/MethodsModel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public function formatRelative(?string $dateTimeText): string
127127
$utcTimeZone = new \DateTimeZone('UTC');
128128
$jDate = new Date($dateTimeText, $utcTimeZone);
129129
$unixStamp = $jDate->toUnix();
130+
$app = Factory::getApplication();
130131

131132
// I'm pretty sure we didn't have MFA in Joomla back in 1970 ;)
132133
if ($unixStamp < 0) {
@@ -135,7 +136,7 @@ public function formatRelative(?string $dateTimeText): string
135136

136137
// I need to display the date in the user's local timezone. That's how you do it.
137138
$user = $this->getCurrentUser();
138-
$userTZ = $user->getParam('timezone', 'UTC');
139+
$userTZ = $user->getParam('timezone', $app->get('offset', 'UTC'));
139140
$tz = new \DateTimeZone($userTZ);
140141
$jDate->setTimezone($tz);
141142

0 commit comments

Comments
 (0)