The Inner Drive Extensible Architecture™—the Idea™

Demonstration: Time zones

The IDEA™ includes a fully-object-oriented, easy-to-integrate set of tools to allow you to use the Internet-standard time zone database—used throughout the world on millions of Unix computers—in your .NET apps.

This demonstration will let you choose any of the 465 time zones in the latest version of the TZDB.

See also the SDK for the Inner Drive Extensible Architecture™—the Idea™.

Region:

UTC 7/23/2024 9:13:51 AM +00:00 UTC
Time to view
Zone:

Code in program.cs

builder.Services.AddSingleton<ISecretProvider, KeyVaultSecretProvider>();
builder.Services.AddSingleton<ITimeZoneFactory, TimeZoneFactory>();
builder.Services.AddSingleton<ITzInfoFileReader, AzureTzInfoFileReader>();

var factory = app.Services.GetRequiredService<ITimeZoneFactory>();
await factory.Initialize();
			

Code on this page

@inject ITimeZoneFactory TimeZoneFactory

private string? _selectedZoneName;
private readonly string _utcName = IdtTimeZone.Utc.Name;

private async Task<IdtTimeZone> SelectedTimeZone()
{
	if (!TimeZoneFactory.Initialized) await TimeZoneFactory.Initialize();

	var zoneName = _selectedZoneName ?? _utcName;
	return await TimeZoneFactory.Find(zoneName, ZoneNotFoundBehavior.ReturnDefault);
}
			
Inner Drive Extensible Architecture - Time Zones
Provides time zone services for Inner Drive applications

Version 5.0.8597.0 Release CLR 7.0.19 7/15/2023 3:37 PM
Copyright ©2023 Inner Drive Technology. All rights reserved. Portions Copyright ©1986-2023 David Braverman.


inner-drive.com
The public-facing website for Inner Drive Technology

Version 2.1.8767.0 Release CLR 7.0.19 1/1/2024 5:25 PM
Copyright ©2024 Inner Drive Technology. All rights reserved. Portions Copyright ©1986-2024 David Braverman.
An error has occurred. This application may no longer respond until reloaded. Reload 🗙