Automation Glossary • Verify DNP3 Time Sync

How to Verify DNP3 Time Sync and Event Timestamps

Merobix Engineering • • 7 min read

A DNP3 system can look perfectly synchronized and still be stamping events with the wrong time. The master writes the clock, the Need Time flag clears, and everyone assumes the sequence-of-events record is trustworthy - until a post-trip investigation lines up events from three outstations and the order makes no physical sense. This page is a verification procedure: not what time sync is, but how to prove, with evidence, that the timestamps your outstations produce actually land where they should.

Back to Blog

Verify DNP3 Time Sync in one line: To verify DNP3 time synchronization, confirm the master is servicing the Need Time flag on every outstation, confirm the master's own clock is disciplined to a reliable source, then force a known field event and compare the timestamp the outstation assigns against a trusted reference clock. A consistent offset points at a clock or link-delay problem; scattered errors point at jitter or an outstation that is not really being synced.

What You Need

You need visibility into the master's communication log or a protocol capture, a list of the outstations with their configured time-sync intervals, and details of the master's own time source. You also need a way to force a harmless, precisely observable field event - a spare digital input you can toggle, a test switch, or a point you can drive from the field with permission.

Finally you need a reference clock you trust more than the system under test: a GPS-disciplined source, a phone synced to network time, or the master's own NTP-synced clock. The whole verification rests on comparing DNP3 timestamps against this reference, so decide up front what your ground truth is and how much error your sequence-of-events analysis can tolerate. That tolerance is site-specific: a pipeline leak investigation and a substation relay race have very different needs.

Confirm the Master Services Need Time

Watch the IIN bits in the outstation responses over at least one full time-sync interval. A healthy pattern is a heartbeat: the outstation raises Need Time on its configured interval, the master writes the time, and the flag clears within a poll cycle or two. If the flag stays set across many cycles, the master is not configured to service it, the write is failing, or the outstation is rejecting it - and every timestamp from that device is suspect until you fix it. The mechanics of clearing the Need Time flag are covered separately; here you only care that the cycle is visibly happening.

Do this per outstation, not per system. It is common to find one legacy device on a fleet that never asserts Need Time because its sync interval was left at a factory default of never, or a master profile where time writes were disabled during commissioning and never re-enabled. Those are exactly the devices that corrupt a multi-station event timeline.

Check the Master's Own Clock First

A DNP3 time write copies the master's clock into the outstation, so the outstations can never be more accurate than the master itself. Before testing anything in the field, verify the master or gateway is disciplined to a proper source - typically NTP time synchronization against a reliable server, or a local GPS clock at sites without dependable network time.

Check the sync status, not just the configuration: an NTP client that has been unable to reach its server for weeks will happily report a configured source while free-running. If the master's clock is off, every outstation it syncs inherits the same error, which is the one failure mode this whole procedure cannot catch by comparing outstations against each other - they will all agree and all be wrong.

Force a Test Event and Compare Timestamps

Now produce ground truth. At a known moment on your reference clock, toggle the test input. Retrieve the resulting event from the outstation and compare the timestamp it carries against the moment you recorded. Repeat a few times, then repeat on other outstations. Keep in mind that DNP3 event times are carried as UTC milliseconds since the epoch, so compare in UTC and let the display layer worry about local time.

Read the pattern, not a single sample. A steady offset of the same magnitude every time means the outstation clock is set wrong or the time write is landing late on a slow link. Errors that scatter randomly suggest the clock is fine but the events are being timestamped on receipt by the master rather than at source - a configuration problem worth confirming, because it silently destroys the value of a sequence-of-events record. An offset that grows between syncs and snaps back after each one is normal drift; whether it is acceptable depends on your tolerance and the sync interval.

Account for Link Delay on Slow Channels

On high-latency links - satellite, congested cellular, slow radio - the time value the master writes is already stale when it arrives, so the outstation clock lands behind by roughly the one-way transit time. DNP3 anticipates this: the protocol includes a delay-measurement exchange the master can use to estimate the round trip and compensate the written time, and a LAN-oriented variant where the outstation records the moment a sync broadcast arrives. Whether your master uses these is a configuration and capability question worth answering per link.

If compensation is unavailable, at least quantify the error: your test-event comparison from the previous step will show the offset directly, and you can decide whether it matters. A consistent known bias on one slow site is manageable in analysis; an unquantified one is not.

Common Mistakes

The classic mistake is treating a cleared Need Time flag as proof of accuracy. The flag only says a write was accepted, not that the written time was right or that it landed without delay. Another is comparing timestamps in mixed time bases - an HMI displaying local time next to a log storing UTC produces phantom offsets of exactly the timezone difference, which sends people chasing a clock fault that does not exist.

Finally, verification is not a one-time event. Firmware updates, replaced radios, and master migrations all change the timing picture, and a device whose oscillator is aging will drift faster each year. Re-run the test-event comparison after significant changes and whenever an event sequence looks physically implausible - it takes minutes and settles arguments that otherwise run for days.

Frequently Asked Questions

How accurate should DNP3 event timestamps be?

It depends entirely on what you use the events for, and it is site-specific. Reconstructing which pump tripped first across a gathering system may tolerate errors of seconds, while relay-level sequence analysis in a substation needs far tighter agreement and often justifies GPS-disciplined clocks at the devices themselves. Decide the tolerance from the analysis you actually perform, then verify against it rather than against an abstract ideal.

Why do my DNP3 events show a 1970 date?

A timestamp near the 1970 epoch means the outstation clock was never set after a restart and is running from its default. The device should be asserting Need Time, so the real question is why the master is not servicing it - the write may be disabled in the master profile, failing on the link, or being rejected by the device. Fix the sync path and the epoch dates disappear.

Is a consistent timestamp offset better than a random one?

Diagnostically, yes. A steady offset points at a specific cause - a wrong clock, an uncompensated link delay, or a timezone confusion - and can even be corrected in analysis if you know its size. Scattered errors are worse because they usually mean events are being stamped at the wrong place, such as on receipt at the master, and no correction can recover the true field ordering.

Sources and verification

This page references the protocol specifications published by the organizations below. Editions, product capabilities, and documentation change over time - confirm current requirements and specifications directly with the source.

Merobix is not affiliated with, endorsed by, or sponsored by these organizations; their names are used only to identify the standards and products discussed.

More in Industrial Protocols
Verify Time Sync Across the SCADA Stack  •  Assign DNP3 Event Classes  •  DNP3 Event Buffer Overflow IIN Flag  •  Set DNP3 Analog Deadbands  •  DNP3 event buffer  •  All Industrial Protocols →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →