Troubleshooting
Why OPC HDA backfill gives PI winter timestamps one hour off
Short answer
A winter-only one-hour error in an OPC HDA backfill means one component is subtracting a fixed daylight-saving offset from timestamps that need the standard offset. Compare paired winter and summer events in UTC at each boundary of the path, find the first boundary where the UTC instant changes, and correct the conversion there before any bulk backfill.
On this page
- Map the path before touching any time setting
- What GMT+1 actually means for the archived data
- Example: why a fixed two-hour subtraction misses winter by one hour
- Find the boundary where the UTC instant first changes
- Correct the conversion at that boundary
- Backfill after the proof, not before
- Questions asked
A backfill that lands one hour early in winter and lands correctly in summer is not a network or client fault: one component in the path is applying a fixed daylight-saving offset to timestamps that need the standard offset. On a Matrikon OPC Server for iHistorian feeding an HDA client toward PI, with a European time zone (standard UTC+1, daylight UTC+2), the observed pattern is a constant two-hour subtraction applied to every record, so winter data arrives one hour ahead of the instants Proficy Historian itself shows in UTC. The fix is diagnostic, not a settings guess: compare the same archived winter and summer events in UTC at each boundary of the path, mark the first boundary where the UTC instant changes, and correct the conversion at that component using date-specific offsets.
Map the path before touching any time setting #
The backfill has three boundaries, and each one is a place a local-to-UTC conversion can hide:
- Client to OPC server: the HDA client (in this path, PI_HDA Tool) connects to the Matrikon server and issues the historical read. Record both hosts, the server identity and the exact archived item selected.
- Server to Historian: the Matrikon server retrieves values, quality and timestamps from the iHistorian archive. This is where a stored local-time representation gets converted for the HDA response.
- HDA to PI: the interface or backfill job submits the returned events to the destination archive, and PI stores what it receives.
Confirm the read completes and returns the expected values and quality for the intended item before examining timestamps at all. A repeatable seasonal offset is a conversion fault, not a link fault. Pick two or three identifiable events from winter and the same number from summer, and record value, quality and timestamp for each so every comparison follows the same event through the path.
What GMT+1 actually means for the archived data #
An installation described as GMT+1 can mean two different things, and they need different conversions. A fixed UTC+1 offset never changes across the year. A regional zone that observes daylight saving uses UTC+1 in winter and UTC+2 in summer, so each event's date decides which offset applies. A display set to local time proves nothing about what is stored.
The OPC HDA specification carries historical timestamps as UTC instants; any server whose source representation is local time must convert before returning them, and the client renders them locally afterward without changing the instant sent downstream. Keep the whole commissioning comparison in UTC: display the reference events in Proficy Historian with UTC presentation selected, and treat those instants as the baseline. A related trap worth ruling out is display-only skew, covered in the article on a historian value that is hours off because of a UTC offset. Note also that the timestamp PI stores is the instant submitted at write time, not when the job finished, as explained in the piece on why a PI value timestamp is not a receipt time.
Example: why a fixed two-hour subtraction misses winter by one hour #
Take one event logged at 14:30 local time in each season, and compare what the correct conversion gives against what a constant minus-two-hours rule gives.
Winter event, zone on standard time (UTC+1): true UTC = 14:30 − 1 h = 13:30 UTC. The path applies −2 h: 14:30 − 2 h = 12:30 UTC. The stored instant is 13:30 − 12:30 = 1 h early.
Summer event, zone on daylight time (UTC+2): true UTC = 14:30 − 2 h = 12:30 UTC. Exact match.
That contrast is the whole signature of this fault: summer spot checks pass, so the path looks commissioned, and only winter ranges are wrong. It also explains why re-testing during daylight-saving season never reproduces the complaint.
Find the boundary where the UTC instant first changes #
Work downstream with the paired events, comparing UTC instants rather than rendered displays:
- Read the reference events through HDA with local-time rendering disabled, and compare the returned instants against the Historian UTC baseline.
- Capture the raw timestamp the server returned, using client diagnostics or a second HDA client that shows UTC, and compare it with what the first tool displays.
- If the raw response is already shifted, the conversion sits between the archive and the server response; inspect the server's interpretation of the stored timestamps.
- If the raw response is correct but the client display differs, the shift sits in client rendering — cosmetic, not a storage error.
- Compare the timestamp submitted to PI with the timestamp the HDA read returned, which separates an HDA-side error from a backfill-side conversion.
The first boundary where the same event changes UTC instant names the component that needs correction.
Correct the conversion at that boundary #
A host time-zone change does not rewrite instants already archived, and no fixed offset can encode seasonal rules — that is why toggling Local Time and switching hosts to GMT/UTC changed nothing. What works:
- If the source timestamps are already UTC, configure the component to pass the instant through without another local-to-UTC conversion.
- If the source timestamps are regional local time, configure the conversion to apply the offset each event's date requires — historical date-specific rules, not the server's current zone.
- Save the configuration before editing, change one conversion setting at a time, and repeat both seasonal reads after each change.
- Accept the correction only when both seasonal samples match the UTC baseline with no compensating offset appearing elsewhere in the path.
If a component still applies a single offset to dates needing two, take the paired source-and-response UTC results plus software versions to the vendor's support channel for a supported correction before any bulk run.
Backfill after the proof, not before #
Once both seasonal samples match, backfill a bounded test range first and restore it against an isolated target, checking known tags, values and timestamps before committing the full archive. The decision rule, per case: winter-only error with clean summer reads — fix the conversion at the boundary where the instant changed, and re-run the paired checks; error in both seasons by the same amount — a single wrong fixed offset or a double conversion, same boundary method; display-only shift with correct stored instants — change the client presentation and leave the archive alone.
Questions asked
Does the PI Data Archive store timestamps in UTC?
Yes. The PI OPC HDA interface passes timestamps to the Data Archive as UTC instants, and the conversion to local time is the viewing client's job. That means an offset error introduced upstream of the interface is stored as-is: correcting the archive afterward is far harder than correcting the conversion before the backfill runs.
Why did changing the server time zone to GMT/UTC not fix the winter timestamps?
A host time-zone change alters how the operating system renders current times and how local-to-UTC conversions are configured going forward. It does not reinterpret instants already archived, and it cannot encode two different offsets for two seasons. That is why toggling Local Time and switching the host zone left the winter error unchanged.
What does the Local Time option in an HDA client actually change?
It only changes how the client renders the UTC timestamps the server returned: either as UTC, or converted to the host's local zone for display. It never rewrites the instants carried in the read response or submitted downstream, so it cannot compensate for a conversion the server applied on the way out.
How do I prove a corrected backfill is safe before running it on the full archive?
Re-read the paired winter and summer reference events after the fix and confirm both UTC instants now match the source archive with no compensating offset elsewhere in the path. Then backfill a bounded test range and restore it in an isolated target, verifying recoverable rows against the known tags, values and timestamps before committing the bulk job.