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

AF SDK Reference

AFTimeZone.ToUniversalTime Method (AFTimeZone, DateTime)

AFTimeZone.ToUniversalTime Method (AFTimeZone, DateTime)

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

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

Syntax

public static DateTime ToUniversalTime(
	AFTimeZone source,
	DateTime time
)
Public Shared Function ToUniversalTime ( 
	source As AFTimeZone,
	time As DateTime
) As DateTime

Dim source As AFTimeZone
Dim time As DateTime
Dim returnValue As DateTime

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

Parameters

source
Type: OSIsoft.AF.TimeAFTimeZone
The AFTimeZone of the time to be converted.
time
Type: SystemDateTime
The DateTime to be converted from the source time zone to Coordinated Universal Time (UTC).

Return Value

Type: DateTime
Returns the time converted to Coordinated Universal Time (UTC).

Remarks

This method converts the time from the local time of the source time zone to Coordinated Universal Time (UTC).

Version Information

AFSDK


See Also

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