Method ToScheduleDateTimeOffset
ToScheduleDateTimeOffset(IPrimeTime, Instant)
Maps an NodaTime.Instant to a DateTimeOffset for the wall time in the receiver's LocalScheduleDateTimeZone.
public static DateTimeOffset ToScheduleDateTimeOffset(this IPrimeTime time, Instant instant)
Parameters
timeIPrimeTimeinstantInstantThe absolute instant on the UTC timeline.
Returns
- DateTimeOffset
A DateTimeOffset with the correct offset for the schedule zone at that instant.
Exceptions
- ArgumentNullException
timeis null.- ArgumentException
timeis not an IPrimeClock and the schedule zone cannot be resolved.
ToScheduleDateTimeOffset(IPrimeTime, ZonedDateTime)
Converts a NodaTime.ZonedDateTime to a DateTimeOffset for the wall time in the receiver's LocalScheduleDateTimeZone.
public static DateTimeOffset ToScheduleDateTimeOffset(this IPrimeTime time, ZonedDateTime zonedDateTime)
Parameters
timeIPrimeTimezonedDateTimeZonedDateTimeA zoned value in any zone; only its instant is used.
Returns
- DateTimeOffset
A DateTimeOffset with the correct offset for the schedule zone at that instant.
Exceptions
- ArgumentNullException
timeis null.- ArgumentException
timeis not an IPrimeClock and the schedule zone cannot be resolved.