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 | 9/27/2023 12:32:34 PM +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.8 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.8600.0 Release CLR 7.0.8 7/18/2023 10:23 PM Copyright ©2023 Inner Drive Technology. All rights reserved. Portions Copyright ©1986-2023 David Braverman.