@Test public void test2008() throws Exception { TaiUtcConverter tuc = new TaiUtcConverter(); DateTimeComponents dtc = tuc.instantToUtc(1230768032000L); assertEquals(59, dtc.second); }
DateTimeComponents instantToUtc(long t) { DateTimeComponents dtc = new DateTimeComponents(); long u; int leap; long s; u = t / 1000; int millisec = (int) (t % 1000); if (millisec < 0) { millisec += 1000; u -= 1; } dtc.millisec = millisec; leap = 0; int ls = diffTaiUtc; for (int i = timesecs.length - 1; i >= 0; i--) { if (u > timesecs[i]) { break; } if (u == timesecs[i]) { leap = 1; break; } ls--; } u -= ls; s = u % 86400L; if (s < 0) { s += 86400L; u -= 86400L; } dtc.second = (int) ((s % 60) + leap); s /= 60; dtc.minute = (int) (s % 60); s /= 60; dtc.hour = (int) s; u /= 86400L; long mjd = 40587 + u; caldateFromMjd(dtc, mjd); return dtc; }
TaiUtcConverter { DateTimeComponents instantToUtc(long t) { DateTimeComponents dtc = new DateTimeComponents(); long u; int leap; long s; u = t / 1000; int millisec = (int) (t % 1000); if (millisec < 0) { millisec += 1000; u -= 1; } dtc.millisec = millisec; leap = 0; int ls = diffTaiUtc; for (int i = timesecs.length - 1; i >= 0; i--) { if (u > timesecs[i]) { break; } if (u == timesecs[i]) { leap = 1; break; } ls--; } u -= ls; s = u % 86400L; if (s < 0) { s += 86400L; u -= 86400L; } dtc.second = (int) ((s % 60) + leap); s /= 60; dtc.minute = (int) (s % 60); s /= 60; dtc.hour = (int) s; u /= 86400L; long mjd = 40587 + u; caldateFromMjd(dtc, mjd); return dtc; } }
TaiUtcConverter { DateTimeComponents instantToUtc(long t) { DateTimeComponents dtc = new DateTimeComponents(); long u; int leap; long s; u = t / 1000; int millisec = (int) (t % 1000); if (millisec < 0) { millisec += 1000; u -= 1; } dtc.millisec = millisec; leap = 0; int ls = diffTaiUtc; for (int i = timesecs.length - 1; i >= 0; i--) { if (u > timesecs[i]) { break; } if (u == timesecs[i]) { leap = 1; break; } ls--; } u -= ls; s = u % 86400L; if (s < 0) { s += 86400L; u -= 86400L; } dtc.second = (int) ((s % 60) + leap); s /= 60; dtc.minute = (int) (s % 60); s /= 60; dtc.hour = (int) s; u /= 86400L; long mjd = 40587 + u; caldateFromMjd(dtc, mjd); return dtc; } TaiUtcConverter();  TaiUtcConverter(InputStream utcTaiHistory); }
TaiUtcConverter { DateTimeComponents instantToUtc(long t) { DateTimeComponents dtc = new DateTimeComponents(); long u; int leap; long s; u = t / 1000; int millisec = (int) (t % 1000); if (millisec < 0) { millisec += 1000; u -= 1; } dtc.millisec = millisec; leap = 0; int ls = diffTaiUtc; for (int i = timesecs.length - 1; i >= 0; i--) { if (u > timesecs[i]) { break; } if (u == timesecs[i]) { leap = 1; break; } ls--; } u -= ls; s = u % 86400L; if (s < 0) { s += 86400L; u -= 86400L; } dtc.second = (int) ((s % 60) + leap); s /= 60; dtc.minute = (int) (s % 60); s /= 60; dtc.hour = (int) s; u /= 86400L; long mjd = 40587 + u; caldateFromMjd(dtc, mjd); return dtc; } TaiUtcConverter();  TaiUtcConverter(InputStream utcTaiHistory); static boolean isLeap(final int year); }
TaiUtcConverter { DateTimeComponents instantToUtc(long t) { DateTimeComponents dtc = new DateTimeComponents(); long u; int leap; long s; u = t / 1000; int millisec = (int) (t % 1000); if (millisec < 0) { millisec += 1000; u -= 1; } dtc.millisec = millisec; leap = 0; int ls = diffTaiUtc; for (int i = timesecs.length - 1; i >= 0; i--) { if (u > timesecs[i]) { break; } if (u == timesecs[i]) { leap = 1; break; } ls--; } u -= ls; s = u % 86400L; if (s < 0) { s += 86400L; u -= 86400L; } dtc.second = (int) ((s % 60) + leap); s /= 60; dtc.minute = (int) (s % 60); s /= 60; dtc.hour = (int) s; u /= 86400L; long mjd = 40587 + u; caldateFromMjd(dtc, mjd); return dtc; } TaiUtcConverter();  TaiUtcConverter(InputStream utcTaiHistory); static boolean isLeap(final int year);  }