ZonedClock class

A clock with an associated time zone and calendar. This is effectively a convenience class decorating an Clock.

Inheritance
Annotations
  • @immutable

Constructors

ZonedClock(Clock _clock, DateTimeZone _zone, CalendarSystem _calendar)
Creates a new ZonedClock with the given clock, time zone and calendar system.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCurrentDate() LocalDate
Returns the local date of the current instant provided by the underlying clock, adjusted to the time zone of this object.
getCurrentInstant() Instant
Returns the current instant provided by the underlying clock.
override
getCurrentLocalDateTime() LocalDateTime
Returns the local date/time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
getCurrentOffsetDateTime() OffsetDateTime
Returns the offset date/time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
getCurrentTimeOfDay() LocalTime
Returns the local time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
getCurrentZonedDateTime() ZonedDateTime
Returns the current instant provided by the underlying clock, adjusted to the time zone of this object.
inTzdbSystemDefaultZone() Future<ZonedClock>
Constructs a ZonedClock from a clock (the target of the method), in the TZDB mapping for the system default time zone time zone and the ISO calendar system.
inherited
inUtc() ZonedClock
Constructs a ZonedClock from a clock (the target of the method), using the UTC time zone and ISO calendar system.
inherited
inZone(DateTimeZone zone, [CalendarSystem? calendar]) ZonedClock
Constructs a ZonedClock from a clock (the target of the method), a time zone, and a calendar system.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited