Soenneker.Utils.TimeZones
4.0.769
Prefix Reserved
dotnet add package Soenneker.Utils.TimeZones --version 4.0.769
NuGet\Install-Package Soenneker.Utils.TimeZones -Version 4.0.769
<PackageReference Include="Soenneker.Utils.TimeZones" Version="4.0.769" />
<PackageVersion Include="Soenneker.Utils.TimeZones" Version="4.0.769" />
<PackageReference Include="Soenneker.Utils.TimeZones" />
paket add Soenneker.Utils.TimeZones --version 4.0.769
#r "nuget: Soenneker.Utils.TimeZones, 4.0.769"
#:package Soenneker.Utils.TimeZones@4.0.769
#addin nuget:?package=Soenneker.Utils.TimeZones&version=4.0.769
#tool nuget:?package=Soenneker.Utils.TimeZones&version=4.0.769
Soenneker.Utils.TimeZones
Cached TimeZoneInfo access for common continental US zones and IANA/CLDR identifier resolution through TimeZoneConverter.
Installation
dotnet add package Soenneker.Utils.TimeZones
Common US zones
using Soenneker.Utils.TimeZones;
TimeZoneInfo eastern = Tz.Eastern;
TimeZoneInfo central = Tz.Central;
TimeZoneInfo mountain = Tz.Mountain;
TimeZoneInfo pacific = Tz.Pacific;
TimeZoneInfo arizona = Tz.Arizona;
The properties are initialized lazily and then reused. They resolve these IANA zones through TimeZoneConverter:
| Property | Source identifier | Daylight saving time |
|---|---|---|
Eastern |
America/New_York |
Observed |
Central |
America/Chicago |
Observed |
Mountain |
America/Boise |
Observed |
Pacific |
America/Los_Angeles |
Observed |
Arizona |
America/Phoenix |
Not observed |
TimeZoneInfo.Id may be an IANA identifier or its Windows equivalent depending on the operating system. Use TimeZoneInfo conversion APIs instead of comparing the returned Id with a hard-coded platform-specific value.
Resolve an identifier
TimeZoneInfo zone = Tz.FromCldr("Europe/Paris");
DateTimeOffset local = TimeZoneInfo.ConvertTime(instant, zone);
The five built-in US zones return their shared property instances. America/Denver and America/Boise both return Tz.Mountain, whose source identifier is America/Boise. Other identifiers are resolved by TZConvert.GetTimeZoneInfo and cached by the exact input string.
Unknown or unsupported identifiers throw the exception produced by TimeZoneConverter. The fallback cache has no eviction, so do not call FromCldr with an unbounded stream of user-controlled identifiers without validating or constraining them first.
Time-zone rules come from the operating system and TimeZoneConverter mappings. They can change as governments and time-zone databases change; store the original zone identifier when future recalculation matters.
Call the static Tz members directly; no dependency-injection registration is required.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- TimeZoneConverter (>= 7.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Soenneker.Utils.TimeZones:
| Package | Downloads |
|---|---|
|
Soenneker.AdaptiveCard.Util
A utility library for Adaptive Card construction |
|
|
Soenneker.Extensions.Strings.Files
A collection of helpful file related string extension methods |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.769 | 354 | 9/15/2026 |
| 4.0.768 | 430 | 9/14/2026 |
| 4.0.767 | 4,615 | 8/30/2026 |
| 4.0.766 | 593 | 8/29/2026 |
| 4.0.765 | 503 | 8/29/2026 |
| 4.0.764 | 5,277 | 7/27/2026 |
| 4.0.763 | 2,174 | 7/16/2026 |
| 4.0.762 | 4,371 | 6/18/2026 |
| 4.0.761 | 3,595 | 6/5/2026 |
| 4.0.760 | 3,981 | 4/23/2026 |
| 4.0.759 | 4,122 | 3/12/2026 |
| 4.0.758 | 158 | 3/12/2026 |
| 4.0.755 | 3,233 | 3/10/2026 |
| 4.0.754 | 1,156 | 3/9/2026 |
| 4.0.753 | 174 | 3/9/2026 |
| 4.0.752 | 2,554 | 3/4/2026 |
| 4.0.751 | 12,821 | 1/2/2026 |
| 4.0.750 | 140 | 1/2/2026 |
| 4.0.749 | 948 | 1/2/2026 |
| 4.0.748 | 4,227 | 11/20/2025 |
Update dependency dotnet-sdk to v10.0.401 (#1335)