Twice a year, a day in your reports has the wrong number of hours. In March it has 23. In November it has 25. If your pipeline assumes every day has 24, two days a year your totals, averages and gap checks come out wrong.
Oklahoma observes daylight saving time, so this applies to you. It is easy to fix once, and painful to find after a year of reports.
What actually changes
In the United States, clocks spring forward on the second Sunday in March and fall back on the first Sunday in November. In Central time, the March change skips the hour from 2:00 to 3:00. The November change repeats the hour from 1:00 to 2:00.
That gives you two failure modes. In spring, a local timestamp such as 2026-03-08 02:30 never existed. In fall, 2026-11-01 01:30 happened twice, an hour apart, and the string alone cannot tell you which one you have.
A system that stores local time without an offset has already lost information on those two days. No query can recover it, because the data does not contain it.
Store the instant, not the wall clock
The fix at the storage layer is to record every measurement as a point on the UTC timeline. UTC has no daylight saving, so every hour has 60 minutes and the ordering never goes backward.
Check how your historian and your database handle time before you trust either one. Some systems store UTC and display local time. Some store local time. Some store UTC but export local time, which hides the problem until someone loads a CSV.
In PostgreSQL, the timestamptz type stores an absolute instant and converts to the session time zone on display. The timestamp type (without time zone) stores whatever wall-clock value you give it, which is the dangerous one for measurement data. Use timestamptz for event times and keep the zone conversion at the edge, in reporting.
Name the column to say what it holds, for example event_ts_utc. A column named time invites someone to guess.
A day is a business rule
Converting to local time is not enough, because “the day” is not always midnight to midnight.
Production reporting often runs on a contract day or a production day with its own start hour. Many U.S. natural gas contracts use a gas day that begins at 9:00 a.m. Central, a convention published by NAESB. Check your own contracts and your production accounting system, because a given operator, purchaser or pipeline may define the day differently.
So write the day boundary down as a rule your pipeline owns. It needs three parts: a time zone name such as America/Chicago, a start hour, and the rule that the zone’s daylight saving changes apply.
Use the zone name, never a fixed offset like -06:00. A fixed offset is right for half the year and wrong for the other half, and it stays wrong silently.
Bucketing in SQL
A common pattern is to shift the local timestamp back by the day-start hour, then truncate to a date. For a 9 a.m. day in PostgreSQL:
select
((event_ts_utc at time zone 'America/Chicago') - interval '9 hours')::date as production_day,
sum(volume) as total_volume,
count(*) as readings
from raw.hourly_volumes
group by 1
order by 1;
The at time zone expression converts the instant to Chicago wall-clock time, honoring daylight saving. Subtracting 9 hours and casting to a date puts each reading into the day that started at 9 a.m.
Test it against the two transition days. With a 9 a.m. start, the production day that contains the 2:00 a.m. change runs 23 hours in March and 25 in November. Run the query and count the readings in those days.
PostgreSQL 12 and later also accept a three-argument date_trunc that takes a zone, which is cleaner when your day starts at midnight. Other databases have their own forms, so check yours.
Checks that catch it
Add a test that counts readings per day per tag and compares it to the expected count. Do not hard-code 24. Compute the expected count from the zone rules for that date, so 23 and 25 pass and 24 on a transition day fails.
This test also catches problems that have nothing to do with daylight saving. A day with too few readings points to a gap. A day with too many points to duplicates.
Treat these cases as fixtures in your test suite, with dates chosen on purpose:
- The spring-forward day, where a local hour is missing.
- The fall-back day, where a local hour appears twice.
- A day on each side of the day-start hour.
- A reading exactly on the boundary, to confirm which day owns it.
A reading at exactly 9:00:00 belongs to one day, not both and not neither. Decide which, write it down, and test it.
Averages and rates
Totals are the obvious casualty. Averages hide the same bug. A daily average computed as total divided by 24 is wrong on a 23-hour or 25-hour day. Divide by the number of hours that actually occurred, or better, compute a time-weighted average from the readings.
Rates have the same trap. Barrels per day is a rate over a period. If the period is 23 hours and you divide by 24, you understate the rate by about four percent, and the error appears on a day when nobody looks closely.
If your downstream users pick a unit of time, such as a per-hour or per-day rate, make the conversion explicit in the transformation instead of leaving it for each report to redo.
What to do this week
Find out what your historian stores. Look at the type of your timestamp columns. Run the counting test against last March and last November. If both pass, you are fine. If either fails, you have found a quiet error that has been in reports for as long as the pipeline has existed.
Fixing it later costs more, because every restated day is a conversation with whoever consumed the number.

