Method SetLocalTime
SetLocalTime(LocalDateTime)
Sets virtual time from a local wall-clock value in the clock's zone, using forward marching when the resolved instant is strictly after the current virtual time.
public void SetLocalTime(LocalDateTime localDateTime)
Parameters
localDateTimeLocalDateTimeThe new current local date and time.
Remarks
Lenient zone mapping applies for skipped or ambiguous local times (spring-forward gaps and fall-back overlaps), consistent with production day-time scheduling. Forward moves honor the same march and ClockEvents rules as SetInstant(Instant).
Exceptions
- InvalidOperationException
Thrown under the same backward-time rules as SetTime(DateTimeOffset).