diff options
author | James Moger <james.moger@gitblit.com> | 2014-03-03 17:23:15 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-03-03 17:23:15 -0500 |
commit | 7717756f44f0b477bc78544ad6762d10f32d03d0 (patch) | |
tree | 4255db8c3767a0fe3e3ddca3b3ca8e33404d6aa2 /src | |
parent | 1f3dff18737576a30bad8e1b7ea45c00fcad265a (diff) | |
download | gitblit-7717756f44f0b477bc78544ad6762d10f32d03d0.tar.gz gitblit-7717756f44f0b477bc78544ad6762d10f32d03d0.zip |
Fixed rounded timestamps of reflogs
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/wicket/panels/DigestsPanel.java | 7 | ||||
-rw-r--r-- | src/main/java/com/gitblit/wicket/panels/ReflogPanel.java | 4 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/DigestsPanel.java b/src/main/java/com/gitblit/wicket/panels/DigestsPanel.java index 318e74c2..237db04d 100644 --- a/src/main/java/com/gitblit/wicket/panels/DigestsPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/DigestsPanel.java @@ -88,13 +88,6 @@ public class DigestsPanel extends BasePanel { } else if (TimeUtils.isYesterday(pushDate, timezone)) {
fuzzydate = tu.yesterday();
} else {
- // calculate a fuzzy time ago date
- cal.setTime(pushDate);
- cal.set(Calendar.HOUR_OF_DAY, 0);
- cal.set(Calendar.MINUTE, 0);
- cal.set(Calendar.SECOND, 0);
- cal.set(Calendar.MILLISECOND, 0);
- pushDate = cal.getTime();
fuzzydate = getTimeUtils().timeAgo(pushDate);
}
logItem.add(new Label("whenChanged", fuzzydate + ", " + df.format(pushDate)));
diff --git a/src/main/java/com/gitblit/wicket/panels/ReflogPanel.java b/src/main/java/com/gitblit/wicket/panels/ReflogPanel.java index abd4ecd3..35fd681b 100644 --- a/src/main/java/com/gitblit/wicket/panels/ReflogPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/ReflogPanel.java @@ -149,8 +149,8 @@ public class ReflogPanel extends BasePanel { cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
- changeDate = cal.getTime();
- fuzzydate = getTimeUtils().timeAgo(changeDate);
+ Date date = cal.getTime();
+ fuzzydate = getTimeUtils().timeAgo(date);
}
changeItem.add(new Label("whenChanged", fuzzydate + ", " + df.format(changeDate)));
|