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

AF SDK Reference

Product Family
Current publication
Table of Contents

PIServer.ServerTime Property

PIServer.ServerTime Property
Gets the current time of the PI Data Archive.

Namespace:  OSIsoft.AF.PI
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.0.1156

Syntax

public AFTime ServerTime { get; }
Public ReadOnly Property ServerTime As AFTime
	Get

Dim instance As PIServer
Dim value As AFTime

value = instance.ServerTime
public:
virtual property AFTime ServerTime {
	AFTime get () sealed;
}
abstract ServerTime : AFTime with get
override ServerTime : AFTime with get

Property Value

Type: AFTime
Returns the current time of the PI Data Archive if connected to the server. Otherwise, MinValue is returned.

Implements

IAFTimeSource.ServerTime

Remarks

The property will cache the server time bias, and will not re-retrieve the server time on every call. It will periodically check against the server and recompute the time bias. If you wish to force a re-check of the server bias, call Refresh().
Note Notes to Callers
This property returns an AFTime, which represents the server time in Coordinated Universal Time (UTC). The property AFTime.LocalTime will convert the UTC Time to the local client time zone, which may be different than the server time zone. To see the time as the local time in the server's timezone, use the following command (where 'server' is the PIServer or PISystem object): server.ServerTimeZone.ToLocalTime(server.ServerTime).

Version Information

AFSDK

Supported in: 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5

See Also

Was this topic helpful?