@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make event lists respect the user preference for time format.

Summary: Ref T8362, Make event lists respect the user preference for time format

Test Plan: Set time format preference to 24-hour format, open Calendar month view, all events should show time tips in 24-hour format.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8362

Differential Revision: https://secure.phabricator.com/D13290

+10 -4
+10 -4
src/view/phui/calendar/PHUICalendarListView.php
··· 141 141 } 142 142 143 143 private function getEventTooltip(AphrontCalendarEventView $event) { 144 + $viewer = $this->getUser(); 145 + $preferences = $viewer->loadPreferences(); 146 + $time_pref = $preferences->getPreference( 147 + PhabricatorUserPreferences::PREFERENCE_TIME_FORMAT, 148 + 'g:i A'); 149 + 144 150 Javelin::initBehavior('phabricator-tooltips'); 145 151 146 152 $start = id(AphrontFormDateControlValue::newFromEpoch( ··· 166 172 if ($start->getValueDate() == $end->getValueDate()) { 167 173 $tip = pht( 168 174 '%s - %s', 169 - $start->getValueAsFormat('g:i A'), 170 - $end->getValueAsFormat('g:i A')); 175 + $start->getValueAsFormat($time_pref), 176 + $end->getValueAsFormat($time_pref)); 171 177 } else { 172 178 $tip = pht( 173 179 '%s - %s', 174 - $start->getValueAsFormat('M j, Y, g:i A'), 175 - $end->getValueAsFormat('M j, Y, g:i A')); 180 + $start->getValueAsFormat('M j, Y, '.$time_pref), 181 + $end->getValueAsFormat('M j, Y, '.$time_pref)); 176 182 } 177 183 } 178 184 return $tip;