public void testAddOneDayOverDstForwardAdds24HoursAt0000(){
  Calendar calendar=new GregorianCalendar(AMERICA_SAO_PAULO);
  calendar.set(2011,9,15,0,0);
  double hoursSinceEpoch=hoursSinceEpoch(calendar);
  calendar.add(Calendar.DATE,1);
  assertEquals(24.0,hoursSinceEpoch(calendar) - hoursSinceEpoch);
  assertCalendarEquals(calendar,2011,9,16,1,0);
}

public void testAddOneDayOverDstForwardAdds24HoursAt0000 ( ) { Calendar calendar = new GregorianCalendar ( AMERICA_SAO_PAULO ) ; calendar . set ( 2011 , 9 , 15 , 0 , 0 ) ; double hoursSinceEpoch = hoursSinceEpoch ( calendar ) ; calendar . add ( Calendar . DATE , 1 ) ; assertEquals ( 24.0 , hoursSinceEpoch ( calendar ) - hoursSinceEpoch ) ; assertCalendarEquals ( calendar , 2011 , 9 , 16 , 1 , 0 ) ; }
at their daylight savings time switch , sao paulo changes from " 00 : 00 gmt - 3 " to " 01 : 00 gmt - 2 " . when adding time across this boundary , drop an hour to keep the hour + minute constant unless that prevents the date field from being incremented . http : / / code . google . com / p / android / issues / detail ? id = 17502
