Browse files

Properly roll back stats start date to Jan 1 0:00.000 five years ago

  • Loading branch information...
1 parent 10c1350 commit c3822ef98618d17e3a954788e5829c0578c1bbc4 @peterdietz peterdietz committed May 4, 2012
View
12 ...lui-api/src/main/java/org/dspace/app/xmlui/aspect/dashboard/ElasticSearchStatsViewer.java
@@ -127,11 +127,15 @@ public void addBody(Body body) throws WingException, SQLException {
//Homepage will show the last 5 years worth of Data, and no form generator.
Calendar cal = Calendar.getInstance();
dateEnd = cal.getTime();
-
- // Rolling back 4 must equate to past five years.
- cal.roll(Calendar.YEAR, -4);
+
+ //Roll back to Jan 1 0:00.000 five years ago.
+ cal.roll(Calendar.YEAR, -5);
cal.set(Calendar.MONTH, 0);
- cal.set(Calendar.DAY_OF_MONTH, 0);
+ cal.set(Calendar.DAY_OF_MONTH, 1);
+ cal.set(Calendar.HOUR_OF_DAY,0);
+ cal.set(Calendar.MINUTE, 0);
+ cal.set(Calendar.SECOND, 0);
+ cal.set(Calendar.MILLISECOND, 0);
dateStart = cal.getTime();
division.addHidden("reportDepth").setValue("summary");

0 comments on commit c3822ef

Please sign in to comment.