AFDataReference.ServerTime Property
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Gets the current time of the server associated with this AFDataReference.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public virtual AFTime ServerTime { get; }
Public Overridable ReadOnly Property ServerTime As AFTime Get Dim instance As AFDataReference Dim value As AFTime value = instance.ServerTime
public: virtual property AFTime ServerTime { AFTime get (); }
abstract ServerTime : AFTime with get override ServerTime : AFTime with get
Property Value
Type: AFTimeReturns the current time of the server associated with this AFDataReference.
Remarks
If the AFDataReference does not override this property, then the current time
of the PI AF Server (see PISystem.ServerTime) is returned.
| 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). |