]> source.dussan.org Git - gitblit.git/commitdiff
Fixed rounded timestamps of reflogs
authorJames Moger <james.moger@gitblit.com>
Mon, 3 Mar 2014 22:23:15 +0000 (17:23 -0500)
committerJames Moger <james.moger@gitblit.com>
Mon, 3 Mar 2014 22:23:15 +0000 (17:23 -0500)
src/main/java/com/gitblit/wicket/panels/DigestsPanel.java
src/main/java/com/gitblit/wicket/panels/ReflogPanel.java

index 318e74c29a6558eaa86c83b83afbead0146bf822..237db04d812dcfcd5bf89404e1cfb6ddca8650c1 100644 (file)
@@ -88,13 +88,6 @@ public class DigestsPanel extends BasePanel {
                                } else if (TimeUtils.isYesterday(pushDate, timezone)) {\r
                                        fuzzydate = tu.yesterday();\r
                                } else {\r
-                                       // calculate a fuzzy time ago date\r
-                       cal.setTime(pushDate);\r
-                       cal.set(Calendar.HOUR_OF_DAY, 0);\r
-                       cal.set(Calendar.MINUTE, 0);\r
-                       cal.set(Calendar.SECOND, 0);\r
-                       cal.set(Calendar.MILLISECOND, 0);\r
-                       pushDate = cal.getTime();\r
                                        fuzzydate = getTimeUtils().timeAgo(pushDate);\r
                                }\r
                                logItem.add(new Label("whenChanged", fuzzydate + ", " + df.format(pushDate)));\r
index abd4ecd39d80a49c4f4cef0c4044904ed7d66baf..35fd681bb536733d865af9610aa7a1e9cf5ed38e 100644 (file)
@@ -149,8 +149,8 @@ public class ReflogPanel extends BasePanel {
                        cal.set(Calendar.MINUTE, 0);\r
                        cal.set(Calendar.SECOND, 0);\r
                        cal.set(Calendar.MILLISECOND, 0);\r
-                       changeDate = cal.getTime();\r
-                                       fuzzydate = getTimeUtils().timeAgo(changeDate);\r
+                       Date date = cal.getTime();\r
+                                       fuzzydate = getTimeUtils().timeAgo(date);\r
                                }\r
                                changeItem.add(new Label("whenChanged", fuzzydate + ", " + df.format(changeDate)));\r
 \r