Method ToScheduleLocalWallDateTime
- Namespace
- KZDev.SystemClock.PrimeTime
- Assembly
- KZDev.SystemClock.PrimeTime.dll
ToScheduleLocalWallDateTime(IPrimeTime, DateTimeOffset)
Converts an absolute DateTimeOffset to the schedule-local wall-clock DateTime (unspecified kind) in the receiver's LocalScheduleTimeZone.
public static DateTime ToScheduleLocalWallDateTime(this IPrimeTime time, DateTimeOffset instant)
Parameters
timeIPrimeTimeinstantDateTimeOffsetAn absolute point in time.
Returns
- DateTime
Local wall date and time in the schedule zone; Kind is Unspecified.
Exceptions
- ArgumentNullException
timeis null.- ArgumentException
timeis not an IPrimeClock and the schedule zone cannot be resolved.
ToScheduleLocalWallDateTime(IPrimeTime, DateTime)
Converts a UTC DateTime to the schedule-local wall-clock DateTime in the receiver's LocalScheduleTimeZone.
public static DateTime ToScheduleLocalWallDateTime(this IPrimeTime time, DateTime utcDateTime)
Parameters
timeIPrimeTimeutcDateTimeDateTimeAn absolute UTC timeline value; must use Utc.
Returns
- DateTime
Local wall date and time in the schedule zone.
Exceptions
- ArgumentNullException
timeis null.- ArgumentException
utcDateTimedoes not use Utc, ortimeis not an IPrimeClock.