Troubleshooting
Why the historian repeats 1 am after fall back and what to keep
Short answer
Both 1:00-1:59 am hours after the fallback are real, distinct records: t_stamp stores milliseconds since midnight January 1, 1970 UTC and keeps rising through the clock change, so the two hours sit 3,600,000 ms apart. Keep both, display the UTC offset, and delete nothing.
On this page
- Why does the historian show 1:00 am twice after fall back?
- What is stored in t_stamp when the clocks change?
- How do you prove the two hours are separate records?
- How do you count rows that truly share a timestamp?
- What has to change on the screen and in reports?
- Is deleting the repeated hour ever the right fix?
- How do daily totals work on a 25-hour day?
- Questions asked
The repeated 1:00-1:59 am after the daylight-saving fallback is a display artifact, not a double write. The tag historian stores each sample under t_stamp as UTC milliseconds since the 1970 Unix epoch, so the sequence rises straight through the clock change and the two 1 am hours sit one hour, 3,600,000 ms, apart in storage. Keep both sets of records, make the display carry the UTC offset so the two hours read differently, and reserve row deletion for records you have proven bad. What follows is the check that proves the records distinct, the arithmetic behind it, the display and report changes that fix the label, and the one case where deleting from the partition is legitimate.
Why does the historian show 1:00 am twice after fall back? #
Because the screen converts two different stored instants into the same local text: the fallback relabels the second hour as 1:00-1:59 am, and a formatter that drops the UTC offset prints both passes of the hour identically. Keep three layers separate while you diagnose:
- Stored instant - the numeric
t_stampthat locates a sample in time. - Zone conversion - the rules that map that instant onto a local date and clock reading.
- Presentation text - the fields kept when the local time becomes a string on screen or in an export.
The samples in the repeated hour differ at the stored-instant layer and collide only at the presentation layer. Adding fractional seconds to the format does not help: the missing information is the offset, not the precision.
What is stored in t_stamp when the clocks change? #
Milliseconds since midnight January 1, 1970 UTC - the tag historian timestamp is documented as a variant of Unix time counted in milliseconds from that epoch, and a local offset change never rewinds it. Elapsed UTC time is linear. When the clocks turn 2:00 am back to 1:00 am, the count since the epoch keeps rising, so the second pass through the local hour lands on fresh, higher t_stamp values and the historian writes new rows instead of colliding with the first pass. Every day holds 24 elapsed hours; the fallback day simply carries one extra local hour label, and the spring-forward day one fewer. Neither changes what was measured.
How do you prove the two hours are separate records? #
Query the raw values for one tag across the window and compare the numbers: records an hour apart in raw t_stamp are separate instants, no matter what the formatted local text claims. Work the check on one tag first:
- Select
tagid,t_stampand the value across the repeated hour, from the historian query itself, before any display formatting touches the result. - Read the numbers, not the dates. For the 2024 US fallback, the first 1:00:00 am carries
t_stamp1730610000000 and the second carries 1730613600000. - Convert each number to UTC and to local time with an explicit offset; one resolves to UTC-4 and the other to UTC-5.
- Call it a stored duplicate only when two rows share
tagidandt_stampexactly, then move to the counting query below.
Worked example, 2024-11-03, US fallback (2:00 am EDT becomes 1:00 am EST):
- 1970-01-01 to 2024-01-01: 54 years at 365 days plus 13 leap days = 19,723 days; 19,723 x 86,400 s = 1,704,067,200 s.
- 2024-01-01 to 2024-11-03 (leap year): 305 days to November 1 plus 2 = 307 days; 307 x 86,400 s = 26,524,800 s; midnight UTC = 1,704,067,200 + 26,524,800 = 1,730,592,000 s.
- First 1:00:00 am local is EDT (UTC-4), so 05:00 UTC: 1,730,592,000 + 5 x 3,600 = 1,730,610,000 s, or t_stamp 1730610000000 ms.
- Second 1:00:00 am local is EST (UTC-5), so 06:00 UTC: 1,730,592,000 + 6 x 3,600 = 1,730,613,600 s, or t_stamp 1730613600000 ms.
- Difference: 1,730,613,600,000 - 1,730,610,000,000 = 3,600,000 ms = 3,600 s = one hour. Two records, two instants, one label.
Convert in either direction by adding the millisecond value to 1970-01-01 00:00:00 - the same discipline as adding the epoch offset instead of counting years - never by rebuilding year or hour fields. When a mislabel has a cause other than the clock change, tracing a PLC tag from controller to historian display covers the wider path.
How do you count rows that truly share a timestamp? #
Group the partition's rows on the pair that identifies a record - tagid with t_stamp - and keep the pairs whose count exceeds one; across a healthy fallback day that query returns zero rows.
-- Illustrative table name: query the data partition covering the repeated day.
SELECT tagid, t_stamp, COUNT(*) AS record_count
FROM november_partition
GROUP BY tagid, t_stamp
HAVING COUNT(*) > 1;
Three cautions before you trust the count:
- Equal values are not duplicates. A steady process logs the same number at many instants; identity is the tag-plus-timestamp pair, never the value.
- Physical row order is not time order. Store-and-forward replay and imports can land rows out of sequence, so compare timestamps, and treat an Ignition historian import that does not display as its own separate fault.
- Read the schema, not the claim. Before relying on any uniqueness rule for the table, read the index and constraint definitions the database actually declares.
What has to change on the screen and in reports? #
Four things: format every timestamp with its UTC offset, sort on the raw instant, resolve report range boundaries to instants, and key any deduplication on tagid plus t_stamp.
- Timestamp format - trend labels, table columns, tooltips and exports show local time plus its offset, so the two hours read 2024-11-03 01:00:00-04:00 and 2024-11-03 01:00:00-05:00, or plain UTC.
- Sorting - order by the raw t_stamp; sorting on formatted text can interleave the two hours in a table.
- Range inputs - a window typed as local 1:00-1:59 am with no offset is ambiguous, so resolve it to the intended instants before the query runs.
- Deduplication and grouping - collapse on the record pair, never on formatted date text, or the report merges two real hours into one.
Pick one convention per audience and hold it: local time with offset where operators relate readings to the plant clock, UTC where exports are reconciled against controller logs or other time zones. Carry the raw timestamp through every intermediate transform and format it last. A component showing the raw epoch number has not resolved the instant at all; resolving a Unix epoch datetime in a Perspective dropdown is exactly that step.
Is deleting the repeated hour ever the right fix? #
Not for a label problem: both passes of the hour are valid measurements, and deleting one leaves a one-hour hole in the trend that the skipped spring hour does not repay. Deletion is remediation for proven bad records - a verified ingestion error, a doubled write you have counted - not for data that merely looks doubled. The skipped hour in spring compensates nothing: a missing local label and a repeated local label are naming effects, and the measurements made during both are real.
If deletion is ever warranted, run it at the storage layer:
- Define the exact tags and the raw t_stamp range; never filter on formatted local time, because a condition covering 1:00-1:59 am selects both occurrences once the offset is discarded.
- Preview the exact rows the condition matches before anything is removed.
- Keep a recoverable copy of the affected partition - the one step that makes a wrong deletion survivable.
- Identify the partition that holds the day; where the Ignition Edge tag historian writes its data is documented for exactly this.
How do daily totals work on a 25-hour day? #
Commit to one definition and print it on the report: the local calendar day across the fallback spans 25 labeled hours, the spring-forward day 23, while elapsed time stays 24 hours. For operator day reports, total by local calendar day and accept that the fallback day contains 25 hours of samples; for anything stated per hour, divide by elapsed hours. A 25-hour accumulation divided by 24 overstates the hourly rate by 25 / 24 - 1, about 4.2 percent. Print the convention in the report header so nobody re-derives it from the total.
Questions asked
Does the historian overwrite the first 1 am hour or write new rows?
New rows. t_stamp keeps rising, so the second pass through 1:00-1:59 am lands on fresh timestamps one hour, 3,600,000 ms, after the first. Nothing is overwritten, and even a strict tag-and-timestamp key sees two distinct rows because the stored values differ.
What does spring-forward do to the stored data?
No local label exists for the skipped hour, but no data goes missing: UTC milliseconds never jump, so samples inside that interval carry normal timestamps and display correctly once the offset is applied. The gap is in the label set, not in the record set.
Should two identical values at 1 am count as one record?
No. A steady process logs the same value at many instants, and value equality is not record identity. Identity is the tag plus the raw timestamp; on that key the two 1 am samples stay separate no matter how the display formats them.
Where do reports usually break after the fallback?
At boundaries and deduplication. A window entered as local 1:00-1:59 am without an offset matches both occurrences, and any step that collapses rows sharing formatted local text merges two distinct hours. Resolve boundaries to instants and key deduplication on the raw pair.
Does the logging configuration need to change for the clock change?
No. Acquisition did its job through the transition: the logging rate and the timestamp source produced a continuous, rising record. The fault sits in the presentation layer, so change the format, sort and range logic and leave the history configuration alone.