Click or drag to resize
OSIsoft, LLC

AFTimeZoneCreateCustomTimeZone Method

Creates a custom AFTimeZone with a specified identifier, an offset from Coordinated Universal Time (UTC), a display name, a standard time name, a daylight savings time name, daylight saving time rules, and a value indicates whether the returned object reflects daylight saving time information.

Namespace:  OSIsoft.AF.Time
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version:
public static AFTimeZone CreateCustomTimeZone(
	string name,
	TimeSpan baseUtcOffset,
	string displayName,
	string standardDisplayName,
	string daylightDisplayName = null,
	TimeZoneInfoAdjustmentRule[] adjustmentRules = null,
	bool disableDaylightSavingTime = false


Type: SystemString
The time zone's invariant culture Name used to identify the new time zone.
Type: SystemTimeSpan
A TimeSpan object that represents the time difference between this time zone and Coordinated Universal Time (UTC).
Type: SystemString
The DisplayName of the new time zone.
Type: SystemString
The StandardName of the new time zone.
daylightDisplayName (Optional)
Type: SystemString
The DaylightName of the new time zone.
adjustmentRules (Optional)
Type: SystemTimeZoneInfoAdjustmentRule
An array of TimeZoneInfo.AdjustmentRule objects that augment the base UTC offset for a particular period.
disableDaylightSavingTime (Optional)
Type: SystemBoolean
Set to to discard any daylight saving time-related information present in adjustmentRules with the new object; otherwise, set to .

Return Value

Type: AFTimeZone
The new time zone. If the disableDaylightSavingTime parameter is , then the returned object has no daylight saving time data.
Version Information


Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5, 2.4
See Also
Enabling Operational Intelligence