@Test
public void format_rfc3339_zeroMillis() {

    Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
    cal.set(1985, 3, 12, 23, 20, 50);
    cal.set(Calendar.MILLISECOND, 0);
    Date date = cal.getTime();
    assertEquals("1985-04-12T23:20:50Z", HttpDateUtils.format(date));
}