int pTime = of(7,18, 32, 232); LocalTime time = asLocalTime(pTime); assertEquals(time.getLong(ChronoField.NANO_OF_DAY), toNanoOfDay(pTime)); } 代码示例来源:origin: benas/random-beans @Override public LocalTime getRandomValue() { long minSecondOfDay = min.getLong(ChronoField.SECOND...
* Converts a {@code LocalTime} to a {@code java.sql.Time}. * * @param time the local time, not null * @return the SQL time, not null */ @SuppressWarnings("deprecation") publicstaticjava.sql.TimetoSqlTime(LocalTimetime){ returnnewjava.sql.Time(time.getHour(),time.getMinute(),ti...
time = LocalTime.ofSecondOfDay(elapsed.getSeconds()); } if (time.getHour() > 0) { return time.format(DateTimeFormatter.ofPattern("HH:mm")); } return time.format(DateTimeFormatter.ofPattern("mm:ss")); } 代码示例来源:origin: blynkkk/blynk-server public void addReportSpecificAtTime(StringBui...