InnerDrive.TimeZones 5.3.1592

dotnet add package InnerDrive.TimeZones --version 5.3.1592
                    
NuGet\Install-Package InnerDrive.TimeZones -Version 5.3.1592
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InnerDrive.TimeZones" Version="5.3.1592" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InnerDrive.TimeZones" Version="5.3.1592" />
                    
Directory.Packages.props
<PackageReference Include="InnerDrive.TimeZones" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InnerDrive.TimeZones --version 5.3.1592
                    
#r "nuget: InnerDrive.TimeZones, 5.3.1592"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package InnerDrive.TimeZones@5.3.1592
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InnerDrive.TimeZones&version=5.3.1592
                    
Install as a Cake Addin
#tool nuget:?package=InnerDrive.TimeZones&version=5.3.1592
                    
Install as a Cake Tool

Inner Drive Extensible Architeture

The Inner Drive Extensible Architecture implements common .NET development situations including time zones, money, measurements and conversions, and Microsoft Azure features.

InnerDrive.TimeZones

Features

  • Implements the IANA time zone database with an easy-to-use API
  • Zones are JIT-compiled for small memory footprint and quick initialization
  • Optional extension in the InnerDrive.Azure package to load zone info from Azure blobs
  • Works with native .NET data types (System.DateTime and System.DateTimeOffset)

Prerequisites

This package runs on .NET 10. It depends on the InnerDrive.Core package.

Usage

  1. Download the IANA time zone database
  2. Add settings to appSettings.json:
{
	"timeZoneSettings": {
		"DefaultTimeZoneHomeZone": "America/Chicago",
		"TimeZoneRuleFolder": ".\\",
		"TimeZoneRuleFileFull": "asia,europe,northAmerica,southAmerica,backward,etcetera"
	}
}
  1. Initialize the TimeZoneFactory:
@inject IConfiguration Configuration

var fileSpec = Configuration[key];
var reader = new LocalTzInfoFileReader(Configuration);
await reader.LoadAsync(fileSpec);
var factory = new TimeZoneFactory(Configuration, reader) { ThrowOnFailure = true };
await factory.LoadFileDataAsync();
await factory.InitializeAsync();
  1. Get local time in your time zone:
var timeZone = await factory.FindAsync("America/Chicago", ZoneNotFoundBehavior.ReturnDefault);
var now = DateTimeOffset.UtcNow;
var localTime = timeZone.ToLocalTime(now);
var testZoneName = Configuration[TimeZoneFactory.DefaultTimeZoneNameSettingKey];
Trace.WriteLine($"{now} == {localTime}");

Output >> 2025-10-05 16:11:34 +00:00 == 2025-10-05 11:11:34 -05:00

var info = timeZone.CurrentInfo(now);
Trace.WriteLine(info);

Output >> 2025-10-05 11:11 CDT

The Inner Drive Technology website has a full SDK and example code. We also have a demo weather site that uses all the IDEA components.

CLDR support

We added support for Unicode's Common Locale Data Repository (CLDR) with release 5.3.9728 on 19 August 2026.

CLDR support lets IdtTimeZone return a localized display name for a zone — e.g. "Central Time" in English, "heure du Centre" in French — instead of just its raw IANA name, and lets TimeZoneFactory build the picker lists a time zone selector typically needs.

Staging CLDR data

  1. Download the metaZones.json and timeZoneNames.json files you need from the cldr-json project: cldr-core/supplemental/metaZones.json, and cldr-dates-full/main/{locale}/timeZoneNames.json for each locale your application supports.
  2. Lay the files out under one folder, with metaZones.json at the root and each locale in its own subfolder:
CldrData/
	metaZones.json
	en/
		timeZoneNames.json
	fr/
		timeZoneNames.json
	fr-CA/
		timeZoneNames.json
  1. Add settings to appSettings.json:
{
	"timeZoneSettings": {
		"cldrFolder": "C:\\CldrData",
		"cldrLocales": "en,fr,fr-CA",
		"cldrDefaultLocale": "en"
	}
}

cldrDefaultLocale is optional (default en) — it's the locale used when a requested culture, and every culture in its parent chain, isn't staged.

Initializing the factory with CLDR support

var tzReader = new LocalTzInfoFileReader(Configuration);
var cldrReader = new LocalCldrFileReader(Configuration);
var factory = new TimeZoneFactory(Configuration, tzReader, cldrReader);
await factory.InitializeAsync();

CLDR data is optional and never fatal: if it's missing or fails to parse, TimeZoneFactory traces the failure and continues without localized names (set timeZoneSettings:throwOnCldrLoadFailure to true if you'd rather it throw instead). Check factory.CldrInitialized to see whether it loaded.

Getting a localized name

var chicago = await factory.FindAsync("America/Chicago");
var name = chicago.LocalizedName(DateTimeOffset.UtcNow, new CultureInfo("fr"), TimeZoneNameStyle.LongGeneric);

Output >> heure du Centre

TimeZoneNameStyle also offers LongStandard, LongDaylight, ShortGeneric, ShortStandard, ShortDaylight, ExemplarCity, and Location (the default — e.g. "Chicago Time").

Building picker lists

// A curated, operator-configured list (add "timeZoneSettings:commonZones" to appSettings.json)
var common = await factory.ListCommonLocalizedNamesAsync(new CultureInfo("fr"));

// Every zone the factory knows about, sorted by offset then name
var all = await factory.ListLocalizedNamesAsync(new CultureInfo("fr"));

// Progressive (type-ahead) search
var matches = await factory.SearchLocalizedNamesAsync("chicago", new CultureInfo("fr"));

Each call returns LocalizedZoneName records (ZoneName, DisplayName, UtcOffset). SearchLocalizedNamesAsync returns nothing for a query shorter than timeZoneSettings:searchMinimumLength (default 3 — lower it for CJK-heavy user bases, where a full query can be one or two characters).

Loading CLDR data from Azure

The InnerDrive.Azure package's AzureCldrFileReader loads the same data from Azure Blob Storage instead of local disk; see that package's README for how to stage and retrieve it.

Feedback

Comments or questions? Send feedback

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on InnerDrive.TimeZones:

Package Downloads
InnerDrive.Azure

Acceleration tools for Microsoft Azure projects

InnerDrive.Geography

Provides geographical services for Inner Drive applications

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.3.1592 132 8/19/2026
5.3.1548 214 7/21/2026
5.3.1533 143 7/15/2026
5.3.1531 149 7/15/2026
5.3.1519 156 7/1/2026
5.3.1508 151 6/25/2026
5.3.1498 155 6/18/2026
5.3.1495 158 6/17/2026
5.3.1263 746 11/21/2025
5.2.1247.1 381 10/12/2025
5.2.1235.1 273 10/5/2025
5.2.1076.1 681 2/14/2025
5.2.989.1 419 11/2/2024
5.2.938.1 469 9/7/2024
5.1.926.1 275 9/2/2024
5.1.871.1 473 6/6/2024
5.1.854.1 392 5/21/2024
Loading failed

Added support for CLDR time zone metadata