dotnet-faketime
Installation
SKILL.md
dotnet-faketime
Overview
.NET 8 introduced System.TimeProvider, an abstract class in
System.Runtime.dll that provides a testable abstraction for time. The
production singleton TimeProvider.System wraps DateTimeOffset.UtcNow, the
local TimeZoneInfo, Stopwatch for high-frequency timestamps, and
System.Threading.Timer.
For tests, FakeTimeProvider (namespace Microsoft.Extensions.Time.Testing,
assembly Microsoft.Extensions.TimeProvider.Testing.dll) subclasses
TimeProvider and gives full control over the fake clock.