mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-22 12:41:19 +01:00
Correct an issue where the commit list could group commits by server time
Summary: Commits in the list are grouped by the date they occurred in server time. This may not be the date they occurred in client time. Use client time, not server time, to group commits. Test Plan: - Set server timezone to "Asia/Famagusta". - Set client timezone to "America/Los_Angeles". - Viewed Phabricator repository history. Here's what it looks like before the change: {F4987094} Note that the headers of the first two groups both say "Yesterday". This is because the first commits in each group occurred on June 1 and June 2, respectively, in Famagusta, but both occurred on June 1 in Los Angeles. Here's what it looks like after the change: {F4987095} Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D18067
This commit is contained in:
parent
335c3a7d12
commit
5335f29ff2
1 changed files with 3 additions and 6 deletions
|
@ -23,15 +23,12 @@ final class DiffusionHistoryListView extends DiffusionHistoryView {
|
||||||
'PhabricatorHarbormasterApplication',
|
'PhabricatorHarbormasterApplication',
|
||||||
$this->getUser());
|
$this->getUser());
|
||||||
|
|
||||||
$rows = array();
|
$cur_date = null;
|
||||||
$ii = 0;
|
|
||||||
$cur_date = 0;
|
|
||||||
$header = null;
|
|
||||||
$view = array();
|
$view = array();
|
||||||
foreach ($this->getHistory() as $history) {
|
foreach ($this->getHistory() as $history) {
|
||||||
$epoch = $history->getEpoch();
|
$epoch = $history->getEpoch();
|
||||||
$new_date = date('Ymd', $history->getEpoch());
|
$new_date = phabricator_date($history->getEpoch(), $viewer);
|
||||||
if ($cur_date != $new_date) {
|
if ($cur_date !== $new_date) {
|
||||||
$date = ucfirst(
|
$date = ucfirst(
|
||||||
phabricator_relative_date($history->getEpoch(), $viewer));
|
phabricator_relative_date($history->getEpoch(), $viewer));
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
|
|
Loading…
Reference in a new issue