TimeZoneFactoryListLocalizedNamesAsync Method

Lists every canonical zone the factory knows about, with each zone's localized display name and current UTC offset.

Definition

Namespace: InnerDrive.TimeZones
Assembly: InnerDrive.TimeZones (in InnerDrive.TimeZones.dll) Version: 5.3.9728.0
C#
public Task<IReadOnlyList<LocalizedZoneName>> ListLocalizedNamesAsync(
	CultureInfo? culture = null,
	TimeZoneNameStyle style = TimeZoneNameStyle.Location,
	CancellationToken cancellationToken = default
)

Parameters

culture  CultureInfo  (Optional)
The culture to resolve display names for. If null, CurrentUICulture is used.
style  TimeZoneNameStyle  (Optional)
The TimeZoneNameStyle to resolve.
cancellationToken  CancellationToken  (Optional)
A CancellationToken controlling the request lifetime

Return Value

TaskIReadOnlyListLocalizedZoneName
Every zone named in ZoneNames exactly once (link aliases are already excluded), sorted by ascending UTC offset then ordinal display name. A zone with no explicit CLDR override or metazone entry (e.g. a Windows-registry zone) still resolves to a synthesized name via the location/GMT tiers of the same TR35 fallback chain LocalizedName(DateTimeOffset, CultureInfo, TimeZoneNameStyle, CldrNameNotFoundBehavior) uses; the raw TZDB zone name is used only when CldrInitialized is false, i.e. no CLDR data is available at all.

Implements

ITimeZoneFactoryListLocalizedNamesAsync(CultureInfo, TimeZoneNameStyle, CancellationToken)

Remarks

If Initialized is false, the method will initialize the factory before returning a result.

See Also