SourceTimestamp
In OPC UA, the SourceTimestamp in a DataValue is the time the data source itself produced or last verified the value. It is the timestamp to store in a historian, because it reflects the process, not the transport. Servers that cannot obtain a source time may leave it unset or copy the server clock into it.
Source time versus server time
SourceTimestamp belongs to the underlying device or driver: the PLC scan that produced the tag, the sensor sample instant, or the moment an aggregating gateway received it from downstream. ServerTimestamp belongs to the OPC UA server that is answering you. For latency analysis you want both. For process analytics, changeover detection and OEE state durations you want SourceTimestamp, because network delay and publishing cycles distort server time.
What servers actually provide
Quality varies sharply by product. A well-implemented server driven by a real device timestamp gives you a source time that matches the process cadence. Many PLC-embedded servers have no device timestamp available and simply set SourceTimestamp equal to ServerTimestamp, or report local time without a UTC offset. Some leave it null, which is legal. Verify on the actual device before designing analytics around it, by reading the same node with TimestampsToReturn set to Both and comparing the two fields over a few minutes.
Cadence artefacts you will see
A subscription reports on change, so consecutive SourceTimestamps are not evenly spaced and gaps are normal. Two artefacts are worth recognising. A heartbeat or watchdog re-send can emit an unchanged value with a stale SourceTimestamp, producing zero-length gaps in the source cadence; the fix documented in OPC Publisher is to wait one heartbeat interval plus one publishing interval before declaring a node silent. And a server restart can produce a burst of identical initial values, because a server always sends the first value when a MonitoredItem is created.
Clock discipline
SourceTimestamp is only as good as the clock behind it. Timestamps are transmitted as UTC, so a device with the wrong time zone handling produces a constant offset that looks like process latency. Unsynchronised clocks also break security, not only data: skew produces BadCertificateTimeInvalid on certificates that are perfectly valid. Run NTP on every server, gateway and PLC that emits timestamps.
Example
Comparing the two timestamps on one node to see whether a server has a real source time
from asyncua import Client, ua
async with Client("opc.tcp://opcua.umati.app:4840") as client:
node = client.get_node("i=2258") # Server_ServerStatus_CurrentTime
dv = await node.read_data_value()
print("source", dv.SourceTimestamp)
print("server", dv.ServerTimestamp)
print("skew_ms", (dv.ServerTimestamp - dv.SourceTimestamp).total_seconds() * 1000)
Defined in: Part 4 - Services; Part 8 - Data Access.
Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.