Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class NodaTime.​ZonedClock

Assembly: NodaTime

Inheritance: object → ZonedClock

Implemented Interfaces

A clock with an associated time zone and calendar. This is effectively a convenience class decorating an <see cref="T:NodaTime.IClock" /> .

Properties

public IClock
Clock
Gets the clock used to provide the current instant.
public DateTimeZone
Zone
Gets the time zone used when converting the current instant into a zone-sensitive value.
Calendar
Gets the calendar system used when converting the current instant into a calendar-sensitive value.

Methods

public Instant
GetCurrentInstant​()
Returns the current instant provided by the underlying clock.
Returns The current instant provided by the underlying clock.
public ZonedDateTime
GetCurrentZonedDateTime​()
Returns the current instant provided by the underlying clock, adjusted to the time zone of this object.
Returns The current instant provided by the underlying clock, adjusted to the time zone of this object.
public LocalDateTime
GetCurrentLocalDateTime​()
Returns the local date/time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
Returns The local date/time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
GetCurrentOffsetDateTime​()
Returns the offset date/time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
Returns The offset date/time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
public LocalDate
GetCurrentDate​()
Returns the local date of the current instant provided by the underlying clock, adjusted to the time zone of this object.
Returns The local date of the current instant provided by the underlying clock, adjusted to the time zone of this object.
public LocalTime
GetCurrentTimeOfDay​()
Returns the local time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
Returns The local time of the current instant provided by the underlying clock, adjusted to the time zone of this object.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object