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 (DateTime)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTimeZone.ToUniversalTime Method (DateTime)
Returns the Coordinated Universal Time (UTC) that corresponds to a specified time.

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

Syntax

public override DateTime ToUniversalTime(
	DateTime time
)
Public Overrides Function ToUniversalTime ( 
	time As DateTime
) As DateTime

Dim instance As AFTimeZone
Dim time As DateTime
Dim returnValue As DateTime

returnValue = instance.ToUniversalTime(time)
public:
virtual DateTime ToUniversalTime(
	DateTime time
) override
abstract ToUniversalTime : 
        time : DateTime -> DateTime 
override ToUniversalTime : 
        time : DateTime -> DateTime 

Parameters

time
Type: SystemDateTime
A time to be converted. If already a UTC time, then no conversion is performed on the returned value.

Return Value

Type: DateTime
Returns a DateTime instance whose value is the UTC time that corresponds to the specified time.

Remarks

Coordinated Universal Time (UTC) is sometimes referred to colloquially as Greenwich Mean Time (GMT). Local time is the date and time on the computer you are using. Offset is the difference between local time and UTC. That is: local time = UTC + offset.

Version Information

AFSDK


See Also

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