DateTimeUtils { public static String toFixedHeaderFormat(Date date) { return FIXED_HEADER_FORMAT.format(date); }  static Calendar getUtcCalendar(); static Date cfiDateToUtc(int days, long seconds, long microseconds); static Date cfiDateToUtc(CompoundData compoundData); static Date mjdFloatDateToUtc(float mjd); static String toVariableHeaderFormat(Date date); static String toFixedHeaderFormat(Date date); static Date fromFixedHeaderFormat(String dateString); static String toFileNameFormat(Date date);  }
@Test public void testToFixedHeaderFormat() { Date date = DateTimeUtils.cfiDateToUtc(0, 0, 0); String variableHeaderFormat = DateTimeUtils.toFixedHeaderFormat(date); assertEquals("UTC=2000-01-01T00:00:00", variableHeaderFormat); date = DateTimeUtils.cfiDateToUtc(1, 0, 0); variableHeaderFormat = DateTimeUtils.toFixedHeaderFormat(date); assertEquals("UTC=2000-01-02T00:00:00", variableHeaderFormat); date = DateTimeUtils.cfiDateToUtc(0, 1, 0); variableHeaderFormat = DateTimeUtils.toFixedHeaderFormat(date); assertEquals("UTC=2000-01-01T00:00:01", variableHeaderFormat); date = DateTimeUtils.cfiDateToUtc(0, 0, 1000); variableHeaderFormat = DateTimeUtils.toFixedHeaderFormat(date); assertEquals("UTC=2000-01-01T00:00:00", variableHeaderFormat); }