Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit c3822ef98618d17e3a954788e5829c0578c1bbc4 1 parent 10c1350
@peterdietz peterdietz authored
View
12 ...xmlui/dspace-xmlui-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");
Please sign in to comment.
Something went wrong with that request. Please try again.