--- old/src/java.base/share/classes/java/time/LocalTime.java 2015-11-30 14:40:01.722101000 +0300 +++ new/src/java.base/share/classes/java/time/LocalTime.java 2015-11-30 14:40:01.546101000 +0300 @@ -1488,6 +1488,21 @@ total += nano; return total; } + /** + * Converts this {@code LocalTime} to the number of seconds since the epoch + * of 1970-01-01T00:00:00Z. + *

+ * This returns the number of seconds from the epoch for this {@link LocalTime}. + * + * @param offset the zone offset, not null + * @return the number of seconds since the epoch of 1970-01-01T00:00:00Z, may be negative + */ + public int toEpochSecond(ZoneOffset offset) { + Objects.requireNonNull(offset, "offset"); + int secs = toSecondOfDay(); + secs -= offset.getTotalSeconds(); + return secs; + } //----------------------------------------------------------------------- /**