FakeTimeProvider.SetUtcNow(DateTimeOffset) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Advances the date and time in the UTC time zone.
public:
void SetUtcNow(DateTimeOffset value);
public void SetUtcNow (DateTimeOffset value);
member this.SetUtcNow : DateTimeOffset -> unit
Public Sub SetUtcNow (value As DateTimeOffset)
Parameters
- value
- DateTimeOffset
The date and time in the UTC time zone.
Exceptions
if the supplied time value is before the current time.
Remarks
This method simply advances time. If the time is set forward beyond the trigger point of any outstanding timers, those timers will immediately trigger. This is unlike the AdjustTime(DateTimeOffset) method below, which has no impact on timers.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈