Table of Contents

Class PrimeTimeScheduleZoneExtensions

Namespace
KZDev.SystemClock.PrimeTime
Assembly
KZDev.SystemClock.PrimeTime.dll

Projects absolute instants into the local schedule time zone carried by an IPrimeClock instance, using the same TimeZoneInfo as LocalScheduleTimeZone.

public static class PrimeTimeScheduleZoneExtensions
Inheritance
PrimeTimeScheduleZoneExtensions

Remarks

These extensions interpret the IPrimeTime receiver as IPrimeClock to read LocalScheduleTimeZone. Production and test clocks implement IPrimeClock; an IPrimeTime that is not a clock cannot resolve a schedule zone and is rejected.

Methods

ToScheduleDateOnly(IPrimeTime, DateTime)

Converts a UTC DateTime to a DateOnly in the receiver's LocalScheduleTimeZone.

ToScheduleDateOnly(IPrimeTime, DateTimeOffset)

Converts an absolute DateTimeOffset to a DateOnly in the receiver's LocalScheduleTimeZone.

ToScheduleDateTimeOffset(IPrimeTime, DateTime)

Converts a UTC DateTime to a DateTimeOffset in the receiver's LocalScheduleTimeZone.

ToScheduleDateTimeOffset(IPrimeTime, DateTimeOffset)

Converts an absolute DateTimeOffset to the same instant expressed with the offset of the receiver's LocalScheduleTimeZone.

ToScheduleLocalWallDateTime(IPrimeTime, DateTime)

Converts a UTC DateTime to the schedule-local wall-clock DateTime in the receiver's LocalScheduleTimeZone.

ToScheduleLocalWallDateTime(IPrimeTime, DateTimeOffset)

Converts an absolute DateTimeOffset to the schedule-local wall-clock DateTime (unspecified kind) in the receiver's LocalScheduleTimeZone.

ToScheduleTimeOnly(IPrimeTime, DateTime)

Converts a UTC DateTime to a TimeOnly in the receiver's LocalScheduleTimeZone.

ToScheduleTimeOnly(IPrimeTime, DateTimeOffset)

Converts an absolute DateTimeOffset to a TimeOnly in the receiver's LocalScheduleTimeZone.