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.​Extensions.​ClockExtensions
Assembly: NodaTime
Inheritance: object → ClockExtensions
Extension methods for <see cref="T:NodaTime.IClock" /> .
Methods
public static
ZonedClock
InZone​(IClock clock,
DateTimeZone zone)
Constructs a <see cref="T:NodaTime.ZonedClock" /> from a clock (the target of the method),
and a time zone.
Returns A <see cref="T:NodaTime.ZonedClock" /> with the given clock and time zone, in the ISO calendar system.
clock
Clock to use in the returned object.
zone
Time zone to use in the returned object.
public static
ZonedClock
InZone​(IClock clock,
DateTimeZone zone,
CalendarSystem calendar)
Constructs a <see cref="T:NodaTime.ZonedClock" /> from a clock (the target of the method),
a time zone, and a calendar system.
Returns A <see cref="T:NodaTime.ZonedClock" /> with the given clock, time zone and calendar system.
clock
Clock to use in the returned object.
zone
Time zone to use in the returned object.
calendar
Calendar to use in the returned object.
public static
ZonedClock
InUtc​(IClock clock)
Constructs a <see cref="T:NodaTime.ZonedClock" /> from a clock (the target of the method),
using the UTC time zone and ISO calendar system.
Returns A <see cref="T:NodaTime.ZonedClock" /> with the given clock, in the UTC time zone and ISO calendar system.
clock
Clock to use in the returned object.
public static
ZonedClock
InTzdbSystemDefaultZone​(IClock clock)
Constructs a <see cref="T:NodaTime.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.
Returns A <c>ZonedClock</c> in the system default time zone (using TZDB) and the ISO calendar system,
using the system clock.
clock
Clock to use in the returned object.
public static
ZonedClock
InBclSystemDefaultZone​(IClock clock)
Constructs a <see cref="T:NodaTime.ZonedClock" /> from a clock (the target of the method), in the wrapper for the
BCL system default time zone time zone and the ISO calendar system.
Returns A <c>ZonedClock</c> in the system default time zone and the ISO calendar system,
using the system clock.
clock
Clock to use in the returned object.
Remarks
The <c>DateTimeZone</c> used is a wrapper for <see cref="P:System.TimeZoneInfo.Local" /> .
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object