| Package | Description |
|---|---|
| org.threeten.bp |
The main API for dates, times, instants, and durations.
|
| org.threeten.bp.format |
Provides classes to print and parse dates and times.
|
| org.threeten.bp.temporal |
Access to date and time using fields and units, plus additional value type classes.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ZoneOffset
A time-zone offset from Greenwich/UTC, such as
+02:00. |
| Modifier and Type | Method and Description |
|---|---|
static ZoneId |
ZoneId.from(TemporalAccessor temporal)
Obtains an instance of
ZoneId from a temporal object. |
ZoneId |
ZonedDateTime.getZone()
Gets the time-zone, such as 'Europe/Paris'.
|
abstract ZoneId |
Clock.getZone()
Gets the time-zone being used to create dates and times.
|
static ZoneId |
ZoneId.of(String zoneId)
Obtains an instance of
ZoneId from an ID ensuring that the
ID is valid and available for use. |
static ZoneId |
ZoneId.of(String zoneId,
Map<String,String> aliasMap)
Obtains an instance of
ZoneId using its ID using a map
of aliases to supplement the standard zone IDs. |
static ZoneId |
ZoneId.systemDefault()
Gets the system default time-zone.
|
| Modifier and Type | Method and Description |
|---|---|
ZonedDateTime |
LocalDate.atStartOfDay(ZoneId zone)
Returns a zoned date-time from this date at the earliest valid time according
to the rules in the time-zone.
|
ZonedDateTime |
LocalDateTime.atZone(ZoneId zone)
Returns a zoned date-time formed from this date-time and the specified time-zone.
|
ZonedDateTime |
OffsetDateTime.atZoneSameInstant(ZoneId zone)
Returns a zoned date-time formed from the instant represented by this
date-time and the specified zone ID.
|
ZonedDateTime |
OffsetDateTime.atZoneSimilarLocal(ZoneId zone)
Returns a zoned date-time formed from this date-time and the specified zone ID.
|
static Clock |
Clock.fixed(Instant fixedInstant,
ZoneId zone)
Obtains a clock that always returns the same instant.
|
static ZonedDateTime |
ZonedDateTime.now(ZoneId zone)
Obtains the current date-time from the system clock in the specified time-zone.
|
static YearMonth |
YearMonth.now(ZoneId zone)
Obtains the current year-month from the system clock in the specified time-zone.
|
static Year |
Year.now(ZoneId zone)
Obtains the current year from the system clock in the specified time-zone.
|
static OffsetTime |
OffsetTime.now(ZoneId zone)
Obtains the current time from the system clock in the specified time-zone.
|
static OffsetDateTime |
OffsetDateTime.now(ZoneId zone)
Obtains the current date-time from the system clock in the specified time-zone.
|
static OffsetDate |
OffsetDate.now(ZoneId zone)
Obtains the current date from the system clock in the specified time-zone.
|
static MonthDay |
MonthDay.now(ZoneId zone)
Obtains the current month-day from the system clock in the specified time-zone.
|
static LocalTime |
LocalTime.now(ZoneId zone)
Obtains the current time from the system clock in the specified time-zone.
|
static LocalDateTime |
LocalDateTime.now(ZoneId zone)
Obtains the current date-time from the system clock in the specified time-zone.
|
static LocalDate |
LocalDate.now(ZoneId zone)
Obtains the current date from the system clock in the specified time-zone.
|
static ZonedDateTime |
ZonedDateTime.of(LocalDateTime localDateTime,
ZoneId zone)
Obtains an instance of
ZonedDateTime from a local date-time. |
static ZonedDateTime |
ZonedDateTime.ofInstant(Instant instant,
ZoneId zone)
Obtains an instance of
ZonedDateTime from an Instant. |
static OffsetTime |
OffsetTime.ofInstant(Instant instant,
ZoneId zone)
Obtains an instance of
OffsetTime from an Instant and zone ID. |
static OffsetDateTime |
OffsetDateTime.ofInstant(Instant instant,
ZoneId zone)
Obtains an instance of
OffsetDateTime from an Instant and zone ID. |
static OffsetDate |
OffsetDate.ofInstant(Instant instant,
ZoneId zone)
Obtains an instance of
OffsetDate from an Instant and zone ID. |
static LocalDateTime |
LocalDateTime.ofInstant(Instant instant,
ZoneId zone)
Obtains an instance of
LocalDateTime from an Instant and zone ID. |
static ZonedDateTime |
ZonedDateTime.ofInstant(LocalDateTime localDateTime,
ZoneOffset offset,
ZoneId zone)
Obtains an instance of
ZonedDateTime from the instant formed by combining
the local date-time and offset. |
static ZonedDateTime |
ZonedDateTime.ofLocal(LocalDateTime localDateTime,
ZoneId zone,
ZoneOffset preferredOffset)
Obtains an instance of
ZonedDateTime from a local date-time
using the preferred offset if possible. |
static ZonedDateTime |
ZonedDateTime.ofStrict(LocalDateTime localDateTime,
ZoneOffset offset,
ZoneId zone)
Obtains an instance of
ZonedDateTime strictly validating the
combination of local date-time, offset and zone ID. |
static Clock |
Clock.system(ZoneId zone)
Obtains a clock that returns the current instant using best available
system clock.
|
static Clock |
Clock.tickMinutes(ZoneId zone)
Obtains a clock that returns the current instant ticking in whole minutes
using best available system clock.
|
static Clock |
Clock.tickSeconds(ZoneId zone)
Obtains a clock that returns the current instant ticking in whole seconds
using best available system clock.
|
abstract Clock |
Clock.withZone(ZoneId zone)
Returns a copy of this clock with a different time-zone.
|
ZonedDateTime |
ZonedDateTime.withZoneSameInstant(ZoneId zone)
Returns a copy of this date-time with a different time-zone,
retaining the instant.
|
ZonedDateTime |
ZonedDateTime.withZoneSameLocal(ZoneId zone)
Returns a copy of this date-time with a different time-zone,
retaining the local date-time if possible.
|
| Modifier and Type | Method and Description |
|---|---|
ZoneId |
DateTimeFormatter.getZone()
Gets the overriding zone to be used during formatting.
|
| Modifier and Type | Method and Description |
|---|---|
DateTimeFormatter |
DateTimeFormatter.withZone(ZoneId zone)
Returns a copy of this formatter with a new override zone.
|
| Constructor and Description |
|---|
DateTimeBuilder(ZoneId zone,
Chrono<?> chrono)
Creates a new instance of the builder.
|
| Modifier and Type | Method and Description |
|---|---|
ZoneId |
ChronoZonedDateTime.getZone()
Gets the zone ID, such as 'Europe/Paris'.
|
| Modifier and Type | Method and Description |
|---|---|
static TemporalQuery<ZoneId> |
TemporalQueries.zone()
A lenient query for the
ZoneId, falling back to the ZoneOffset. |
static TemporalQuery<ZoneId> |
TemporalQueries.zoneId()
A strict query for the
ZoneId. |
| Modifier and Type | Method and Description |
|---|---|
ChronoZonedDateTime<C> |
ChronoLocalDateTime.atZone(ZoneId zone)
Returns a zoned date-time formed from this date-time and the specified time-zone.
|
LocalDate |
ISOChrono.dateNow(ZoneId zone)
Obtains the current ISO local date from the system clock in the specified time-zone.
|
ChronoLocalDate<C> |
Chrono.dateNow(ZoneId zone)
Obtains the current local date in this chronology from the system clock in the specified time-zone.
|
ChronoZonedDateTime<C> |
ChronoZonedDateTime.withZoneSameInstant(ZoneId zoneId)
Returns a copy of this date-time with a different time-zone,
retaining the instant.
|
ChronoZonedDateTime<C> |
ChronoZonedDateTime.withZoneSameLocal(ZoneId zoneId)
Returns a copy of this ZonedDateTime with a different time-zone,
retaining the local date-time if possible.
|
ChronoZonedDateTime<C> |
Chrono.zonedDateTime(Instant instant,
ZoneId zone)
Obtains a zoned date-time in this chronology from an
Instant. |
Copyright © 2007-2013 ThreeTen.org. All Rights Reserved.