GetUtcOffset method

Duration GetUtcOffset(
  1. DateTime wallClock
)
Gets the offset to UTC in effect at the given local wall-clock time.

Implementation

Duration GetUtcOffset(DateTime wallClock) => IsDaylightSavingTime(wallClock)
    ? StandardOffset + DaylightDelta
    : StandardOffset;