Skip to main content

IUtilityService.GetSystemTimeZoneInfo

Reference​

TimeZoneInfo IUtilityService.GetSystemTimeZoneInfo(string timeZoneId)

User get System.TimeZoneInfo Object when pass timeZoneId as parameter.

Parameters​

timeZoneId - string: The identifier of the time zone to retrieve. This should be a valid time zone ID recognized by the protrak platform. Valid values are picklist option Names from StandardTimeZone atrribute, such as "Asia/Kolkata"" or "Etc/UTC".

Returns​

System.TimeZoneInfo: This method return System.TimeZoneInfo Object. Where System.TimeZoneInfo is object from System TimeZone.

Usage​

var systemTimeZone = IUtilityService.GetSystemTimeZoneInfo(timeZoneId);

Example​


var timeZoneId = IUtilityService.GetProtrakSupportedTimeZones()
.FirstOrDefault(tz => tz.Name == settings.timeZoneId).Name;
var systemTimeZone = IUtilityService.GetSystemTimeZoneInfo(timeZoneId);