From 22ddae11f8030ad86885cfe190d78d1deb512a53 Mon Sep 17 00:00:00 2001 From: "D. Moonfire" Date: Sat, 21 Jan 2023 17:48:39 -0600 Subject: [PATCH] fix(temporal): added CurrentInstant and CurrentDateTime to TimeService --- src/MfGames.Nitride.Temporal/TimeService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/MfGames.Nitride.Temporal/TimeService.cs b/src/MfGames.Nitride.Temporal/TimeService.cs index 3d30142..baedd71 100644 --- a/src/MfGames.Nitride.Temporal/TimeService.cs +++ b/src/MfGames.Nitride.Temporal/TimeService.cs @@ -28,6 +28,16 @@ public class TimeService /// public IClock Clock { get; set; } + /// + /// Gets the current date time. + /// + public DateTime CurrentDateTime => this.ToDateTime(this.CurrentInstant); + + /// + /// Gets the current instant. + /// + public Instant CurrentInstant => this.Clock.GetCurrentInstant(); + /// /// Gets or sets the date time zone used for processing. ///