fix(temporal): added CurrentInstant and CurrentDateTime to TimeService
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details

This commit is contained in:
D. Moonfire 2023-01-21 17:48:39 -06:00
parent b32ca7582c
commit 22ddae11f8
1 changed files with 10 additions and 0 deletions

View File

@ -28,6 +28,16 @@ public class TimeService
/// </summary>
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>
/// Gets or sets the date time zone used for processing.
/// </summary>