Düzenle

Aracılığıyla paylaş


FakeTimeProvider.SetUtcNow(DateTimeOffset) Method

Definition

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