Class ZonedClock
Represents a provider of ZonedDateTime instances.
public sealed class ZonedClock : ZonedClockBase, IZonedClock, IGenerator<ZonedDateTime>, IGenerator
- Inheritance
-
ZonedClock
- Implements
- Inherited Members
- Extension Methods
Constructors
ZonedClock(TimeZoneInfo)
Creates a new ZonedClock instance.
public ZonedClock(TimeZoneInfo timeZone)
Parameters
timeZone
TimeZoneInfoTime zone of this clock.
Fields
Local
ZonedClock instance that returns ZonedDateTime instances in the Local time zone.
public static readonly ZonedClock Local
Field Value
Utc
ZonedClock instance that returns ZonedDateTime instances in the Utc time zone.
public static readonly ZonedClock Utc
Field Value
Methods
GetNow()
Returns the current ZonedDateTime.
[Pure]
public override ZonedDateTime GetNow()
Returns
- ZonedDateTime
Current ZonedDateTime.