Class DateTimeProvider
Defines an interface for providing current date and time information.
public sealed class DateTimeProvider : IDateTimeProvider
- Inheritance
-
DateTimeProvider
- Implements
- Inherited Members
Constructors
DateTimeProvider()
public DateTimeProvider()
Properties
Now
Gets the current local date and time.
public DateTimeOffset Now { get; }
Property Value
- DateTimeOffset
A DateTimeOffset object representing the current local date and time.
UtcNow
Gets the current Coordinated Universal Time (UTC) date and time.
public DateTimeOffset UtcNow { get; }
Property Value
- DateTimeOffset
A DateTimeOffset object representing the current UTC date and time.