SimpleDateFormat android not formatting as expected
问题 I'm trying to use SimpleDateFormat for formatting a date represented by 3 ints. It looks like this: ... SimpleDateFormat sdfHour = new SimpleDateFormat("HH"); SimpleDateFormat sdfMinute = new SimpleDateFormat("mm"); SimpleDateFormat sdfSecond = new SimpleDateFormat("ss"); Calendar c = Calendar.getInstance(); c.setTimeZone(TimeZone.getDefault()); int hours = c.get(Calendar.HOUR_OF_DAY); int minutes = c.get(Calendar.MINUTE); int seconds = c.get(Calendar.SECOND); String string_hours = sdfHour