Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFTimeZone.ToLocalTime Method (AFTimeZone, DateTime)

AFTimeZone.ToLocalTime Method (AFTimeZone, DateTime)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTimeZone.ToLocalTime Method (AFTimeZone, DateTime)
Convert a DateTime to the specified AFTimeZone.

Namespace:  OSIsoft.AF.Time
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static DateTime ToLocalTime(
	AFTimeZone destination,
	DateTime time
)
Public Shared Function ToLocalTime ( 
	destination As AFTimeZone,
	time As DateTime
) As DateTime

Dim destination As AFTimeZone
Dim time As DateTime
Dim returnValue As DateTime

returnValue = AFTimeZone.ToLocalTime(destination, 
	time)
public:
static DateTime ToLocalTime(
	AFTimeZone^ destination, 
	DateTime time
)
static member ToLocalTime : 
        destination : AFTimeZone * 
        time : DateTime -> DateTime 

Parameters

destination
Type: OSIsoft.AF.TimeAFTimeZone
The AFTimeZone of the returned time.
time
Type: SystemDateTime
The DateTime to be converted to the local time of the destination time zone.

Return Value

Type: DateTime
Returns the time as a local time in the destination time zone.

Remarks

This method converts the time to the local time representation of the specified destination time zone.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in