Skip to content
Documentation

ITimeZoneFactory Interface

Used to create time zones.

public interface ITimeZoneFactory

ITimeZoneFactory.CreateFromId(string) Method

Section titled “ITimeZoneFactory.CreateFromId(string) Method”

Creates a time zone based on a given id. The ID can be specified in the following formats: - Custom timezone ID - IANA ID - Window ID

Please note that the IANA and Windows timezones contain adjustment rules. On non NT platforms like Linux, BSD and Mac Os, the Windows ID will map to an equivalent IANA timezone, according to TimeZoneConverter.

<example>IANA ID:

<code>

var ianaTimeZone = timeZoneFactory.CreateFromId(“Europe/Vienna”);

</code></example>

HAKOM.TSM.Net.Api.Time.TimeZones.ITimeZone CreateFromId(string id);

id System.String

The IANA ID, Windows ID or UTC + offset of the time zone.

ITimeZone
A new instance of ITimeZone.

Creates a time zone based on the time zone of the computer/server where the application runs.

HAKOM.TSM.Net.Api.Time.TimeZones.ITimeZone CreateLocal();

ITimeZone
A new instance of ITimeZone.

ITimeZoneFactory.TryCreateFromId(string, ITimeZone) Method

Section titled “ITimeZoneFactory.TryCreateFromId(string, ITimeZone) Method”

A non throwing variant of: CreateFromId(string).

bool TryCreateFromId(string id, out HAKOM.TSM.Net.Api.Time.TimeZones.ITimeZone? timeZone);

id System.String

The id to use

timeZone ITimeZone

If successful, contains the time zone.

System.Boolean
True if successful

© 2026 Volue.Version v0.6.38017 November 2026