From 74e73c7f2cd1f0ecc4e65d009e0d8ce2d9160e97 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sun, 25 Mar 2012 18:10:33 -0400
Subject: [PATCH] Corrected timestamp on activity panel from author time to committer time
---
src/com/gitblit/wicket/pages/ActivityPage.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/com/gitblit/wicket/pages/ActivityPage.java b/src/com/gitblit/wicket/pages/ActivityPage.java
index 634b298..bceac8f 100644
--- a/src/com/gitblit/wicket/pages/ActivityPage.java
+++ b/src/com/gitblit/wicket/pages/ActivityPage.java
@@ -67,7 +67,8 @@
// determine repositories to view and retrieve the activity
List<RepositoryModel> models = getRepositories(params);
- List<Activity> recentActivity = ActivityUtils.getRecentActivity(models, daysBack, objectId);
+ List<Activity> recentActivity = ActivityUtils.getRecentActivity(models,
+ daysBack, objectId, getTimeZone());
if (recentActivity.size() == 0) {
// no activity, skip graphs and activity panel
@@ -79,7 +80,7 @@
int totalCommits = 0;
Set<String> uniqueAuthors = new HashSet<String>();
for (Activity activity : recentActivity) {
- totalCommits += activity.commits.size();
+ totalCommits += activity.getCommitCount();
uniqueAuthors.addAll(activity.getAuthorMetrics().keySet());
}
int totalAuthors = uniqueAuthors.size();
@@ -173,8 +174,9 @@
GoogleChart chart = new GoogleLineChart("chartDaily", getString("gb.dailyActivity"), "day",
getString("gb.commits"));
SimpleDateFormat df = new SimpleDateFormat("MMM dd");
+ df.setTimeZone(getTimeZone());
for (Activity metric : recentActivity) {
- chart.addValue(df.format(metric.startDate), metric.commits.size());
+ chart.addValue(df.format(metric.startDate), metric.getCommitCount());
}
chart.setWidth(w);
chart.setHeight(h);
--
Gitblit v1.9.1