Sign sub-hour UTC offsets

Merged
SI
3mo ago
+44-40

Supersedes #1868, which GitHub closed automatically when its base branch (#1854) was deleted on merge. Same change, rebased onto main.

GetDateOffset took the sign from the hour component. For an offset of less than an hour that component is zero, so TimeSpan.FromMinutes(-30) rendered as 0-30 while its positive twin rendered +0-30 — the two are indistinguishable by sign, and a negative offset silently reads as positive.

The sign now comes from the offset as a whole and the components are rendered unsigned. Every other case renders exactly as before: -1-30, -5, +1-30, +5, +0.

Only reachable with a constructed offset, since no real timezone sits in that range.

Built on top of #1854, so it keeps that PR's FormattableString.Invariant style and its theory test untouched. One line of its comment changed: the sign is now written as a literal rather than taken from a negative number, so the culture pinning covers the digits rather than the sign.

The rebase conflicted with #1856 (SubMillisecondTicks, merged since), which appends tests at the same point in DateFormatterTests. Purely additive — both kept.

DateFormatterTests.SubHourOffsets covers both signs and asserts the two no longer render the same. Verified with a local run of the full appveyor.yml build script in Release on the merged result: build clean, all 17 test projects pass.