Uses of Class
java.time.LocalTime
Packages that use LocalTime
Package
Description
Provides the API for accessing and processing data stored in a
data source (usually a relational database) using the
Java programming language.
The main API for dates, times, instants, and durations.
Generic API for calendar systems other than the default ISO.
Access to date and time using fields and units, and date time adjusters.
Support for time-zones and their rules.
-
Uses of LocalTime in java.sql
-
Uses of LocalTime in java.time
Modifier and TypeClassDescriptionfinal classA time without a time-zone in the ISO-8601 calendar system, such as10:15:30.Modifier and TypeFieldDescriptionstatic final LocalTimeLocalTime.MAXThe maximum supportedLocalTime, '23:59:59.999999999'.static final LocalTimeLocalTime.MIDNIGHTThe time of midnight at the start of the day, '00:00'.static final LocalTimeLocalTime.MINThe minimum supportedLocalTime, '00:00'.static final LocalTimeLocalTime.NOONThe time of noon in the middle of the day, '12:00'.Modifier and TypeMethodDescriptionstatic LocalTimeLocalTime.from(TemporalAccessor temporal) Obtains an instance ofLocalTimefrom a temporal object.LocalTime.minus(long amountToSubtract, TemporalUnit unit) Returns a copy of this time with the specified amount subtracted.LocalTime.minus(TemporalAmount amountToSubtract) Returns a copy of this time with the specified amount subtracted.LocalTime.minusHours(long hoursToSubtract) Returns a copy of thisLocalTimewith the specified number of hours subtracted.LocalTime.minusMinutes(long minutesToSubtract) Returns a copy of thisLocalTimewith the specified number of minutes subtracted.LocalTime.minusNanos(long nanosToSubtract) Returns a copy of thisLocalTimewith the specified number of nanoseconds subtracted.LocalTime.minusSeconds(long secondsToSubtract) Returns a copy of thisLocalTimewith the specified number of seconds subtracted.static LocalTimeLocalTime.now()Obtains the current time from the system clock in the default time-zone.static LocalTimeObtains the current time from the specified clock.static LocalTimeObtains the current time from the system clock in the specified time-zone.static LocalTimeLocalTime.of(int hour, int minute) Obtains an instance ofLocalTimefrom an hour and minute.static LocalTimeLocalTime.of(int hour, int minute, int second) Obtains an instance ofLocalTimefrom an hour, minute and second.static LocalTimeLocalTime.of(int hour, int minute, int second, int nanoOfSecond) Obtains an instance ofLocalTimefrom an hour, minute, second and nanosecond.static LocalTimeObtains an instance ofLocalTimefrom anInstantand zone ID.static LocalTimeLocalTime.ofNanoOfDay(long nanoOfDay) Obtains an instance ofLocalTimefrom a nanos-of-day value.static LocalTimeLocalTime.ofSecondOfDay(long secondOfDay) Obtains an instance ofLocalTimefrom a second-of-day value.static LocalTimeLocalTime.parse(CharSequence text) Obtains an instance ofLocalTimefrom a text string such as10:15.static LocalTimeLocalTime.parse(CharSequence text, DateTimeFormatter formatter) Obtains an instance ofLocalTimefrom a text string using a specific formatter.LocalTime.plus(long amountToAdd, TemporalUnit unit) Returns a copy of this time with the specified amount added.LocalTime.plus(TemporalAmount amountToAdd) Returns a copy of this time with the specified amount added.LocalTime.plusHours(long hoursToAdd) Returns a copy of thisLocalTimewith the specified number of hours added.LocalTime.plusMinutes(long minutesToAdd) Returns a copy of thisLocalTimewith the specified number of minutes added.LocalTime.plusNanos(long nanosToAdd) Returns a copy of thisLocalTimewith the specified number of nanoseconds added.LocalTime.plusSeconds(long secondstoAdd) Returns a copy of thisLocalTimewith the specified number of seconds added.LocalDateTime.toLocalTime()Gets theLocalTimepart of this date-time.OffsetDateTime.toLocalTime()Gets theLocalTimepart of this date-time.OffsetTime.toLocalTime()Gets theLocalTimepart of this date-time.ZonedDateTime.toLocalTime()Gets theLocalTimepart of this date-time.LocalTime.truncatedTo(TemporalUnit unit) Returns a copy of thisLocalTimewith the time truncated.LocalTime.with(TemporalAdjuster adjuster) Returns an adjusted copy of this time.LocalTime.with(TemporalField field, long newValue) Returns a copy of this time with the specified field set to a new value.LocalTime.withHour(int hour) Returns a copy of thisLocalTimewith the hour-of-day altered.LocalTime.withMinute(int minute) Returns a copy of thisLocalTimewith the minute-of-hour altered.LocalTime.withNano(int nanoOfSecond) Returns a copy of thisLocalTimewith the nano-of-second altered.LocalTime.withSecond(int second) Returns a copy of thisLocalTimewith the second-of-minute altered.Modifier and TypeMethodDescriptionCombines this date with a time to create aLocalDateTime.intCompares this time to another time.booleanChecks if this time is after the specified time.booleanChecks if this time is before the specified time.static LocalDateTimeObtains an instance ofLocalDateTimefrom a date and time.static OffsetDateTimeOffsetDateTime.of(LocalDate date, LocalTime time, ZoneOffset offset) Obtains an instance ofOffsetDateTimefrom a date, time and offset.static OffsetTimeOffsetTime.of(LocalTime time, ZoneOffset offset) Obtains an instance ofOffsetTimefrom a local time and an offset.static ZonedDateTimeObtains an instance ofZonedDateTimefrom a local date and time.longLocalDate.toEpochSecond(LocalTime time, ZoneOffset offset) Converts thisLocalDateto the number of seconds since the epoch of 1970-01-01T00:00:00Z. -
Uses of LocalTime in java.time.chrono
Methods in java.time.chrono that return LocalTimeModifier and TypeMethodDescriptionChronoLocalDateTime.toLocalTime()Gets the local time part of this date-time.default LocalTimeChronoZonedDateTime.toLocalTime()Gets the local time part of this date-time.Methods in java.time.chrono with parameters of type LocalTimeModifier and TypeMethodDescriptiondefault ChronoLocalDateTime<?> Combines this date with a time to create aChronoLocalDateTime.final ChronoLocalDateTime<HijrahDate> final ChronoLocalDateTime<JapaneseDate> final ChronoLocalDateTime<MinguoDate> -
Uses of LocalTime in java.time.temporal
Methods in java.time.temporal that return types with arguments of type LocalTimeModifier and TypeMethodDescriptionstatic TemporalQuery<LocalTime> TemporalQueries.localTime()A query forLocalTimereturning null if not found. -
Uses of LocalTime in java.time.zone
Methods in java.time.zone that return LocalTimeModifier and TypeMethodDescriptionZoneOffsetTransitionRule.getLocalTime()Gets the local time of day of the transition which must be checked withZoneOffsetTransitionRule.isMidnightEndOfDay().Methods in java.time.zone with parameters of type LocalTimeModifier and TypeMethodDescriptionstatic ZoneOffsetTransitionRuleZoneOffsetTransitionRule.of(Month month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, boolean timeEndOfDay, ZoneOffsetTransitionRule.TimeDefinition timeDefinition, ZoneOffset standardOffset, ZoneOffset offsetBefore, ZoneOffset offsetAfter) Obtains an instance defining the yearly rule to create transitions between two offsets.