← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6207: Setting calendar fields to 0 instead of calling clear, which just set fields to undefined

 

------------------------------------------------------------
revno: 6207
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-03-07 19:00:12 +0100
message:
  Setting calendar fields to 0 instead of calling clear, which just set fields to undefined
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java	2012-02-12 17:33:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java	2012-03-07 18:00:12 +0000
@@ -235,9 +235,9 @@
      */
     public static final void clearTimeOfDay( Calendar calendar )
     {
-        calendar.clear( Calendar.MILLISECOND );
-        calendar.clear( Calendar.SECOND );
-        calendar.clear( Calendar.MINUTE );
+        calendar.set( Calendar.MILLISECOND, 0 );
+        calendar.set( Calendar.SECOND, 0 );
+        calendar.set( Calendar.MINUTE, 0 );
         calendar.set( Calendar.HOUR_OF_DAY, 0 );
     }