/** * Gets the hour-of-day field. * * @return the hour-of-day, from 0 to 23 */ public int getHour() { return time.getHour(); }
/** * Gets the hour-of-day field. * * @return the hour-of-day, from 0 to 23 */ public int getHour() { return time.getHour(); }
/** * Gets the hour-of-day field. * * @return the hour-of-day, from 0 to 23 */ public int getHour() { return time.getHour(); }
/** * Gets the hour-of-day field. * * @return the hour-of-day, from 0 to 23 */ public int getHour() { return time.getHour(); }
/** * 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") public static java.sql.Time toSqlTime(LocalTime time) { return new java.sql.Time(time.getHour(), time.getMinute(), time.getSecond()); }
/** * 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") public static java.sql.Time toSqlTime(LocalTime time) { return new java.sql.Time(time.getHour(), time.getMinute(), time.getSecond()); }
@Override public void serialize(LocalTime value, JsonGenerator g, SerializerProvider provider) throws IOException { if (useTimestamp(provider)) { g.writeStartArray(); g.writeNumber(value.getHour()); g.writeNumber(value.getMinute()); if(value.getSecond() > 0 || value.getNano() > 0) { g.writeNumber(value.getSecond()); if(value.getNano() > 0) { if(provider.isEnabled(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS)) g.writeNumber(value.getNano()); else g.writeNumber(value.get(ChronoField.MILLI_OF_SECOND)); } } g.writeEndArray(); } else { DateTimeFormatter dtf = _formatter; if (dtf == null) { dtf = _defaultFormatter(); } g.writeString(value.format(dtf)); } }
final int afterDiff = offsetAfter.getTotalSeconds() - stdOffset; final int timeByte = (timeSecs % 3600 == 0 && timeSecs <= SECS_PER_DAY ? (timeSecs == SECS_PER_DAY ? 24 : time.getHour()) : 31); final int stdOffsetByte = (stdOffset % 900 == 0 ? stdOffset / 900 + 128 : 255); final int beforeByte = (beforeDiff == 0 || beforeDiff == 1800 || beforeDiff == 3600 ? beforeDiff / 1800 : 3);
final int afterDiff = offsetAfter.getTotalSeconds() - stdOffset; final int timeByte = (timeSecs % 3600 == 0 && timeSecs <= SECS_PER_DAY ? (timeSecs == SECS_PER_DAY ? 24 : time.getHour()) : 31); final int stdOffsetByte = (stdOffset % 900 == 0 ? stdOffset / 900 + 128 : 255); final int beforeByte = (beforeDiff == 0 || beforeDiff == 1800 || beforeDiff == 3600 ? beforeDiff / 1800 : 3);