fix(temporal): added CurrentInstant and CurrentDateTime to TimeService
This commit is contained in:
parent
b32ca7582c
commit
22ddae11f8
1 changed files with 10 additions and 0 deletions
|
@ -28,6 +28,16 @@ public class TimeService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IClock Clock { get; set; }
|
public IClock Clock { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current date time.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CurrentDateTime => this.ToDateTime(this.CurrentInstant);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current instant.
|
||||||
|
/// </summary>
|
||||||
|
public Instant CurrentInstant => this.Clock.GetCurrentInstant();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the date time zone used for processing.
|
/// Gets or sets the date time zone used for processing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Reference in a new issue