From 7717756f44f0b477bc78544ad6762d10f32d03d0 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 3 Mar 2014 17:23:15 -0500 Subject: Fixed rounded timestamps of reflogs --- src/main/java/com/gitblit/wicket/panels/DigestsPanel.java | 7 ------- src/main/java/com/gitblit/wicket/panels/ReflogPanel.java | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src') 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))); -- cgit v1.2.3