From e5aebed0b610b70b914a98eb68eb0f464c13aed5 Mon Sep 17 00:00:00 2001 From: Gregorius Soedharmo Date: Thu, 3 Oct 2024 21:59:19 +0700 Subject: [PATCH] Revert #7349 and #7352 (#7353) * Revert "Fix unit tests related to the Persistence DateTime bug (#7352)" This reverts commit f5c4e63ce678b3b2f7cb4070c6b8438cf5176b1e. * Revert "Fix DateTimeOffset.DateTime UTC bug (#7349)" This reverts commit 33fd92d015e1c23ba13c4661b2df5b9538b416af. --- .../CoreAPISpec.ApproveCore.DotNet.verified.txt | 4 ---- .../CoreAPISpec.ApproveCore.Net.verified.txt | 4 ---- ...CoreAPISpec.ApproveTestKit.DotNet.verified.txt | 1 - .../CoreAPISpec.ApproveTestKit.Net.verified.txt | 1 - .../LocalSnapshotStoreSpec.cs | 2 +- .../Query/PersistenceIdsSpec.cs | 3 +-- .../SnapshotStoreSerializationSpec.cs | 15 +++++---------- .../Snapshot/SnapshotStoreSaveSnapshotSpec.cs | 6 ++---- .../Snapshot/SnapshotStoreSpec.cs | 9 +++------ src/core/Akka.Persistence/Eventsourced.cs | 2 +- src/core/Akka.TestKit/TestScheduler.cs | 4 ---- src/core/Akka.Tests/Actor/ActorSystemSpec.cs | 1 - .../Actor/Scheduler/SchedulerShutdownSpec.cs | 1 - .../Actor/Scheduler/DateTimeNowTimeProvider.cs | 2 -- .../Actor/Scheduler/HashedWheelTimerScheduler.cs | 5 ----- src/core/Akka/Actor/Scheduler/ITimeProvider.cs | 6 +----- src/core/Akka/Actor/Scheduler/SchedulerBase.cs | 9 +-------- 17 files changed, 15 insertions(+), 60 deletions(-) diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.DotNet.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.DotNet.verified.txt index 07d24aa497a..60fa2406c64 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.DotNet.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.DotNet.verified.txt @@ -592,7 +592,6 @@ namespace Akka.Actor [System.ObsoleteAttribute("This class will be removed in Akka.NET v1.6.0 - use the IScheduler instead.")] public class DateTimeOffsetNowTimeProvider : Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider { - public System.DateTime DateTimeNow { get; } public System.TimeSpan HighResMonotonicClock { get; } public static Akka.Actor.DateTimeOffsetNowTimeProvider Instance { get; } public System.TimeSpan MonotonicClock { get; } @@ -933,7 +932,6 @@ namespace Akka.Actor public sealed class HashedWheelTimerScheduler : Akka.Actor.SchedulerBase, Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider, System.IDisposable { public HashedWheelTimerScheduler(Akka.Configuration.Config scheduler, Akka.Event.ILoggingAdapter log) { } - protected override System.DateTime DateTimeNow { get; } public override System.TimeSpan HighResMonotonicClock { get; } public override System.TimeSpan MonotonicClock { get; } protected override System.DateTimeOffset TimeNow { get; } @@ -1174,7 +1172,6 @@ namespace Akka.Actor } public interface ITimeProvider { - System.DateTime DateTimeNow { get; } System.TimeSpan HighResMonotonicClock { get; } System.TimeSpan MonotonicClock { get; } System.DateTimeOffset Now { get; } @@ -1625,7 +1622,6 @@ namespace Akka.Actor protected readonly Akka.Event.ILoggingAdapter Log; protected readonly Akka.Configuration.Config SchedulerConfig; protected SchedulerBase(Akka.Configuration.Config scheduler, Akka.Event.ILoggingAdapter log) { } - protected abstract System.DateTime DateTimeNow { get; } public abstract System.TimeSpan HighResMonotonicClock { get; } public abstract System.TimeSpan MonotonicClock { get; } protected abstract System.DateTimeOffset TimeNow { get; } diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.Net.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.Net.verified.txt index c9b83f24a7d..eccf3f67d9b 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.Net.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveCore.Net.verified.txt @@ -592,7 +592,6 @@ namespace Akka.Actor [System.ObsoleteAttribute("This class will be removed in Akka.NET v1.6.0 - use the IScheduler instead.")] public class DateTimeOffsetNowTimeProvider : Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider { - public System.DateTime DateTimeNow { get; } public System.TimeSpan HighResMonotonicClock { get; } public static Akka.Actor.DateTimeOffsetNowTimeProvider Instance { get; } public System.TimeSpan MonotonicClock { get; } @@ -931,7 +930,6 @@ namespace Akka.Actor public sealed class HashedWheelTimerScheduler : Akka.Actor.SchedulerBase, Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider, System.IDisposable { public HashedWheelTimerScheduler(Akka.Configuration.Config scheduler, Akka.Event.ILoggingAdapter log) { } - protected override System.DateTime DateTimeNow { get; } public override System.TimeSpan HighResMonotonicClock { get; } public override System.TimeSpan MonotonicClock { get; } protected override System.DateTimeOffset TimeNow { get; } @@ -1172,7 +1170,6 @@ namespace Akka.Actor } public interface ITimeProvider { - System.DateTime DateTimeNow { get; } System.TimeSpan HighResMonotonicClock { get; } System.TimeSpan MonotonicClock { get; } System.DateTimeOffset Now { get; } @@ -1623,7 +1620,6 @@ namespace Akka.Actor protected readonly Akka.Event.ILoggingAdapter Log; protected readonly Akka.Configuration.Config SchedulerConfig; protected SchedulerBase(Akka.Configuration.Config scheduler, Akka.Event.ILoggingAdapter log) { } - protected abstract System.DateTime DateTimeNow { get; } public abstract System.TimeSpan HighResMonotonicClock { get; } public abstract System.TimeSpan MonotonicClock { get; } protected abstract System.DateTimeOffset TimeNow { get; } diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveTestKit.DotNet.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveTestKit.DotNet.verified.txt index 31de4931eff..55cff536c32 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveTestKit.DotNet.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveTestKit.DotNet.verified.txt @@ -577,7 +577,6 @@ namespace Akka.TestKit { public TestScheduler(Akka.Configuration.Config schedulerConfig, Akka.Event.ILoggingAdapter log) { } public Akka.Actor.IAdvancedScheduler Advanced { get; } - public System.DateTime DateTimeNow { get; } public System.TimeSpan HighResMonotonicClock { get; } public System.TimeSpan MonotonicClock { get; } public System.DateTimeOffset Now { get; } diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveTestKit.Net.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveTestKit.Net.verified.txt index 43d0479d33c..681fff75319 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveTestKit.Net.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveTestKit.Net.verified.txt @@ -577,7 +577,6 @@ namespace Akka.TestKit { public TestScheduler(Akka.Configuration.Config schedulerConfig, Akka.Event.ILoggingAdapter log) { } public Akka.Actor.IAdvancedScheduler Advanced { get; } - public System.DateTime DateTimeNow { get; } public System.TimeSpan HighResMonotonicClock { get; } public System.TimeSpan MonotonicClock { get; } public System.DateTimeOffset Now { get; } diff --git a/src/core/Akka.Persistence.TCK.Tests/LocalSnapshotStoreSpec.cs b/src/core/Akka.Persistence.TCK.Tests/LocalSnapshotStoreSpec.cs index 1f184ab6c62..abb96739751 100644 --- a/src/core/Akka.Persistence.TCK.Tests/LocalSnapshotStoreSpec.cs +++ b/src/core/Akka.Persistence.TCK.Tests/LocalSnapshotStoreSpec.cs @@ -42,7 +42,7 @@ protected override void AfterAll() public void LocalSnapshotStore_can_snapshot_actors_with_PersistenceId_containing_invalid_path_characters() { var pid = @"p\/:*?-1"; - SnapshotStore.Tell(new SaveSnapshot(new SnapshotMetadata(pid, 1, Sys.Scheduler.DateTimeNow), "sample data"), TestActor); + SnapshotStore.Tell(new SaveSnapshot(new SnapshotMetadata(pid, 1, Sys.Scheduler.Now.DateTime), "sample data"), TestActor); ExpectMsg(); SnapshotStore.Tell(new LoadSnapshot(pid, SnapshotSelectionCriteria.Latest, long.MaxValue), TestActor); diff --git a/src/core/Akka.Persistence.TCK/Query/PersistenceIdsSpec.cs b/src/core/Akka.Persistence.TCK/Query/PersistenceIdsSpec.cs index c62c0f5e214..43c69a42dff 100644 --- a/src/core/Akka.Persistence.TCK/Query/PersistenceIdsSpec.cs +++ b/src/core/Akka.Persistence.TCK/Query/PersistenceIdsSpec.cs @@ -247,8 +247,7 @@ protected IActorRef WriteSnapshot(string persistenceId, int n) ExpectMsg($"{persistenceId}-{i}-done"); } - var metadata = new SnapshotMetadata(persistenceId, n + 10, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(persistenceId, n + 10, Sys.Scheduler.Now.DateTime); SnapshotStore.Tell(new SaveSnapshot(metadata, $"s-{n}"), _senderProbe.Ref); _senderProbe.ExpectMsg(); diff --git a/src/core/Akka.Persistence.TCK/Serialization/SnapshotStoreSerializationSpec.cs b/src/core/Akka.Persistence.TCK/Serialization/SnapshotStoreSerializationSpec.cs index b9575c77e3d..4d8c8fad5fa 100644 --- a/src/core/Akka.Persistence.TCK/Serialization/SnapshotStoreSerializationSpec.cs +++ b/src/core/Akka.Persistence.TCK/Serialization/SnapshotStoreSerializationSpec.cs @@ -69,8 +69,7 @@ public virtual void SnapshotStore_should_serialize_Payload() var snapshot = new Test.MySnapshot("a"); - var metadata = new SnapshotMetadata(Pid, 1, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(Pid, 1, Sys.Scheduler.Now.DateTime); SnapshotStore.Tell(new SaveSnapshot(metadata, snapshot), probe.Ref); probe.ExpectMsg(); @@ -86,8 +85,7 @@ public virtual void SnapshotStore_should_serialize_Payload_with_string_manifest( var snapshot = new Test.MySnapshot2("a"); - var metadata = new SnapshotMetadata(Pid, 1, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(Pid, 1, Sys.Scheduler.Now.DateTime); SnapshotStore.Tell(new SaveSnapshot(metadata, snapshot), probe.Ref); probe.ExpectMsg(); @@ -109,8 +107,7 @@ public virtual void SnapshotStore_should_serialize_AtLeastOnceDeliverySnapshot() }; var atLeastOnceDeliverySnapshot = new AtLeastOnceDeliverySnapshot(17, unconfirmed); - var metadata = new SnapshotMetadata(Pid, 2, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(Pid, 2, Sys.Scheduler.Now.DateTime); SnapshotStore.Tell(new SaveSnapshot(metadata, atLeastOnceDeliverySnapshot), probe.Ref); probe.ExpectMsg(); @@ -126,8 +123,7 @@ public virtual void SnapshotStore_should_serialize_AtLeastOnceDeliverySnapshot_w var unconfirmed = Array.Empty(); var atLeastOnceDeliverySnapshot = new AtLeastOnceDeliverySnapshot(13, unconfirmed); - var metadata = new SnapshotMetadata(Pid, 2, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(Pid, 2, Sys.Scheduler.Now.DateTime); SnapshotStore.Tell(new SaveSnapshot(metadata, atLeastOnceDeliverySnapshot), probe.Ref); probe.ExpectMsg(); @@ -142,8 +138,7 @@ public virtual void SnapshotStore_should_serialize_PersistentFSMSnapshot() var persistentFSMSnapshot = new PersistentFSM.PersistentFSMSnapshot("mystate", "mydata", TimeSpan.FromDays(4)); - var metadata = new SnapshotMetadata(Pid, 2, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(Pid, 2, Sys.Scheduler.Now.DateTime); SnapshotStore.Tell(new SaveSnapshot(metadata, persistentFSMSnapshot), probe.Ref); probe.ExpectMsg(); diff --git a/src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSaveSnapshotSpec.cs b/src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSaveSnapshotSpec.cs index 4b5f20599d7..035ae4a1ec4 100644 --- a/src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSaveSnapshotSpec.cs +++ b/src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSaveSnapshotSpec.cs @@ -138,16 +138,14 @@ public async Task MultipleSnapshotsWithSameSeqNo() var snapshotStore = persistence.SnapshotStoreFor(null); var snap = new TestPayload(SenderProbe.Ref); - var metadata = new SnapshotMetadata(PersistenceId, 3, DateTime.UtcNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(PersistenceId, 3, DateTime.Now); snapshotStore.Tell(new SaveSnapshot(metadata, snap), SenderProbe); var success = await SenderProbe.ExpectMsgAsync(10.Minutes()); success.Metadata.PersistenceId.Should().Be(metadata.PersistenceId); success.Metadata.Timestamp.Should().Be(metadata.Timestamp); success.Metadata.SequenceNr.Should().Be(metadata.SequenceNr); - metadata = new SnapshotMetadata(PersistenceId, 3, DateTime.UtcNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + metadata = new SnapshotMetadata(PersistenceId, 3, DateTime.Now); snapshotStore.Tell(new SaveSnapshot(metadata, 3), SenderProbe); success = await SenderProbe.ExpectMsgAsync(); success.Metadata.PersistenceId.Should().Be(metadata.PersistenceId); diff --git a/src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSpec.cs b/src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSpec.cs index 1efd1ab2514..68879cf8643 100644 --- a/src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSpec.cs +++ b/src/core/Akka.Persistence.TCK/Snapshot/SnapshotStoreSpec.cs @@ -102,8 +102,7 @@ private IEnumerable WriteSnapshots() { for (int i = 1; i <= 5; i++) { - var metadata = new SnapshotMetadata(Pid, i + 10, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(Pid, i + 10, Sys.Scheduler.Now.DateTime); SnapshotStore.Tell(new SaveSnapshot(metadata, $"s-{i}"), _senderProbe.Ref); yield return _senderProbe.ExpectMsg().Metadata; } @@ -313,8 +312,7 @@ public virtual void SnapshotStore_should_save_and_overwrite_snapshot_with_same_s [Fact] public virtual void SnapshotStore_should_save_bigger_size_snapshot() { - var metadata = new SnapshotMetadata(Pid, 100, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(Pid, 100, Sys.Scheduler.Now.DateTime); var bigSnapshot = new byte[SnapshotByteSizeLimit]; new Random().NextBytes(bigSnapshot); SnapshotStore.Tell(new SaveSnapshot(metadata, bigSnapshot), _senderProbe.Ref); @@ -328,8 +326,7 @@ public virtual void ShouldSerializeSnapshots() if (!SupportsSerialization) return; var probe = CreateTestProbe(); - var metadata = new SnapshotMetadata(Pid, 100L, Sys.Scheduler.DateTimeNow); - metadata.Timestamp.Kind.Should().Be(DateTimeKind.Utc); + var metadata = new SnapshotMetadata(Pid, 100L, Sys.Scheduler.Now.DateTime); var snap = new TestPayload(probe.Ref); SnapshotStore.Tell(new SaveSnapshot(metadata, snap), _senderProbe.Ref); diff --git a/src/core/Akka.Persistence/Eventsourced.cs b/src/core/Akka.Persistence/Eventsourced.cs index 04683204439..4d34a40745e 100644 --- a/src/core/Akka.Persistence/Eventsourced.cs +++ b/src/core/Akka.Persistence/Eventsourced.cs @@ -218,7 +218,7 @@ public void LoadSnapshot(string persistenceId, SnapshotSelectionCriteria criteri /// TBD public void SaveSnapshot(object snapshot) { - SnapshotStore.Tell(new SaveSnapshot(new SnapshotMetadata(SnapshotterId, SnapshotSequenceNr, Context.System.Scheduler.DateTimeNow), snapshot)); + SnapshotStore.Tell(new SaveSnapshot(new SnapshotMetadata(SnapshotterId, SnapshotSequenceNr, Context.System.Scheduler.Now.Date), snapshot)); } /// diff --git a/src/core/Akka.TestKit/TestScheduler.cs b/src/core/Akka.TestKit/TestScheduler.cs index 73d64b5e51c..43e39765176 100644 --- a/src/core/Akka.TestKit/TestScheduler.cs +++ b/src/core/Akka.TestKit/TestScheduler.cs @@ -212,10 +212,6 @@ public void ScheduleRepeatedly(TimeSpan initialDelay, TimeSpan interval, Action /// /// TBD /// - public DateTime DateTimeNow { get { return DateTime.SpecifyKind(_now.DateTime, DateTimeKind.Utc); } } - /// - /// TBD - /// public TimeSpan MonotonicClock { get { return Util.MonotonicClock.Elapsed; } } /// /// TBD diff --git a/src/core/Akka.Tests/Actor/ActorSystemSpec.cs b/src/core/Akka.Tests/Actor/ActorSystemSpec.cs index 658c913c3b1..d6b02a7d71f 100644 --- a/src/core/Akka.Tests/Actor/ActorSystemSpec.cs +++ b/src/core/Akka.Tests/Actor/ActorSystemSpec.cs @@ -452,7 +452,6 @@ public void ScheduleTellRepeatedly(TimeSpan initialDelay, TimeSpan interval, ICa } public DateTimeOffset Now { get; private set; } - public DateTime DateTimeNow { get; private set; } public TimeSpan MonotonicClock { get; private set; } public TimeSpan HighResMonotonicClock { get; private set; } public IAdvancedScheduler Advanced { get; private set; } diff --git a/src/core/Akka.Tests/Actor/Scheduler/SchedulerShutdownSpec.cs b/src/core/Akka.Tests/Actor/Scheduler/SchedulerShutdownSpec.cs index 929fcb5c939..bf613c85095 100644 --- a/src/core/Akka.Tests/Actor/Scheduler/SchedulerShutdownSpec.cs +++ b/src/core/Akka.Tests/Actor/Scheduler/SchedulerShutdownSpec.cs @@ -36,7 +36,6 @@ private class ShutdownScheduler : SchedulerBase, IDisposable protected override DateTimeOffset TimeNow { get; } - protected override DateTime DateTimeNow { get; } public override TimeSpan MonotonicClock { get; } public override TimeSpan HighResMonotonicClock { get; } diff --git a/src/core/Akka/Actor/Scheduler/DateTimeNowTimeProvider.cs b/src/core/Akka/Actor/Scheduler/DateTimeNowTimeProvider.cs index 2ed4ef2f36d..d8784095c64 100644 --- a/src/core/Akka/Actor/Scheduler/DateTimeNowTimeProvider.cs +++ b/src/core/Akka/Actor/Scheduler/DateTimeNowTimeProvider.cs @@ -19,8 +19,6 @@ private DateTimeOffsetNowTimeProvider() { } public DateTimeOffset Now { get { return DateTimeOffset.UtcNow; } } - public DateTime DateTimeNow => DateTime.UtcNow; - public TimeSpan MonotonicClock {get { return Util.MonotonicClock.Elapsed; }} public TimeSpan HighResMonotonicClock{get { return Util.MonotonicClock.ElapsedHighRes; }} diff --git a/src/core/Akka/Actor/Scheduler/HashedWheelTimerScheduler.cs b/src/core/Akka/Actor/Scheduler/HashedWheelTimerScheduler.cs index ce346ff52c4..78429b41754 100644 --- a/src/core/Akka/Actor/Scheduler/HashedWheelTimerScheduler.cs +++ b/src/core/Akka/Actor/Scheduler/HashedWheelTimerScheduler.cs @@ -396,11 +396,6 @@ private void PlaceInBucket(SchedulerRegistration reg) /// protected override DateTimeOffset TimeNow => DateTimeOffset.UtcNow; - /// - /// TBD - /// - protected override DateTime DateTimeNow => DateTime.UtcNow; - /// /// TBD /// diff --git a/src/core/Akka/Actor/Scheduler/ITimeProvider.cs b/src/core/Akka/Actor/Scheduler/ITimeProvider.cs index a889ddab8e0..6f8f30a5adf 100644 --- a/src/core/Akka/Actor/Scheduler/ITimeProvider.cs +++ b/src/core/Akka/Actor/Scheduler/ITimeProvider.cs @@ -20,14 +20,10 @@ namespace Akka.Actor public interface ITimeProvider { /// - /// Gets the scheduler's notion of current time in . + /// Gets the scheduler's notion of current time. /// DateTimeOffset Now { get; } /// - /// Gets the scheduler's notion of current time in . - /// - DateTime DateTimeNow { get; } - /// /// TBD /// TimeSpan MonotonicClock { get; } diff --git a/src/core/Akka/Actor/Scheduler/SchedulerBase.cs b/src/core/Akka/Actor/Scheduler/SchedulerBase.cs index 7e11197ec01..c5416e16535 100644 --- a/src/core/Akka/Actor/Scheduler/SchedulerBase.cs +++ b/src/core/Akka/Actor/Scheduler/SchedulerBase.cs @@ -97,18 +97,11 @@ void IActionScheduler.ScheduleRepeatedly(TimeSpan initialDelay, TimeSpan interva IAdvancedScheduler IScheduler.Advanced { get { return this; } } DateTimeOffset ITimeProvider.Now { get { return TimeNow; } } - DateTime ITimeProvider.DateTimeNow => DateTime.SpecifyKind(TimeNow.DateTime, DateTimeKind.Utc); - /// - /// The current time in UTC. + /// The current time in UTC. /// protected abstract DateTimeOffset TimeNow { get; } - /// - /// The current time in UTC. - /// - protected abstract DateTime DateTimeNow { get; } - /// /// The current time since startup, as determined by the monotonic clock implementation. ///