
Timezone drift in historical market data means the offset between a file's timestamps and true market time changes partway through the series, usually at a daylight-saving (DST) transition. You detect it by testing whether session edges, such as the weekly close, stay at the same clock time across DST regimes, and by looking for duplicated, missing and phantom bars around transition dates. If the edges move by an hour, the timestamps drifted. Clean, documented data prevents the problem before it reaches your backtest, which is why we ship minute-bar sets with their time conventions checked bar by bar.
TL;DR
- "Timezone drift" in price data is a shift in the UTC offset of the timestamps over time, normally by exactly 60 minutes. It is not the same thing as hardware clock drift.
- The fastest test is weekend-edge constancy: the weekly close and reopen should sit at the same clock time in both DST regimes. If they jump by an hour, the data has a timezone problem.
- Check the transition weekends separately. Spring transitions can leave a missing hour, and autumn transitions can leave a duplicated or overwritten hour.
- Fix errors by converting through a named IANA timezone, never a fixed offset, and write down every assumption you make.
- Starting from data that is already verified and documented saves the audit. Our Annual Plan is 119 EUR per year.
Table of Contents
- What timezone drift actually is
- Why DST creates the problem
- How timezone drift affects a backtest
- How to detect timezone drift in minute bars
- How to correct the errors without creating new ones
- Where clock drift still belongs
- Why we think the audit should happen before you buy
- Skip the repair work
- FAQ
- Sources
What timezone drift actually is
The phrase gets used for three different things, and only one of them is a data-quality problem for backtesting.
Clock drift is a hardware effect. According to university distributed-systems course notes, clock drift is the difference in the rate at which two clocks count time, caused by physical differences in crystals plus heat, humidity and voltage. Typical rates are around one microsecond per second. The same notes define clock skew as the disagreement between two clocks at one instant, which grows as drift accumulates until a synchronization step corrects it. A common worked figure: a clock that drifts by 1 part per million is off by about 86 milliseconds a day.
That matters for tick-level latency studies. For minute bars it is almost always noise.
Data drift is a machine-learning term. It means the statistical distribution of your inputs changes over time. It is a modeling concern, not a timestamp concern.
Timezone drift is the one that wrecks minute-bar backtests. The timestamps are labeled in some local or server time, and the relationship between that label and UTC changes when a DST rule kicks in, when a provider changes its convention, or when files from two periods are stitched together with different offsets. The error is not milliseconds. It is a whole hour, and it is invisible unless you look for it.
Why DST creates the problem
Local time is a poor storage format. The IETF's timestamp standard, RFC 3339, notes that daylight-saving rules are convoluted and can change by local law at unpredictable times, so the best interoperability comes from UTC. It also defines a numeric offset as local time minus UTC, so 18:50:00-04:00 is the same instant as 22:50:00Z.
In the US, DST in 2026 runs from March 8 at 2 a.m. to November 1 at 2 a.m. local time. At the spring change the clock skips from 2 a.m. to 3 a.m., so one hour does not exist. At the autumn change 1 a.m. happens twice, so one hour exists twice. A timestamp written in local wall-clock time without an offset cannot tell those two 1 a.m. hours apart.
Rules also differ by country and era. The IANA time zone database, which is the reference most software uses, records, for example, a European rule under which DST starts on the last Sunday of March and ends on the last Sunday of October, and it records Russian DST rules that applied for years and were later dropped. Historical offsets come from that database, not from a single number you remember.
A worked example: the three-week gap
Suppose a forex feed is stamped in a European server time that follows EU DST, while the market's weekly cycle follows New York time. In 2026 the US moved clocks on March 8, but the EU did so on the last Sunday of March, which was March 29. For about three weeks the gap between the two zones was one hour shorter than usual. The same thing happens in autumn for roughly a week, because the EU ends DST on the last Sunday of October and the US on the first Sunday of November.

If you convert that feed with one fixed offset, every bar in those windows is placed an hour off. A session-open strategy that trades the first bar after the London open will, for those weeks, trade a bar that is an hour earlier or later than you think. Multiply that by every year of history and by the number of strategies sharing the file.
Our guide to DST errors in forex minute data walks through the same effect for specific broker conventions.
How timezone drift affects a backtest
The damage shows up in four places.
- Session logic. Rules such as "trade after the London open" or "flat before the New York close" depend on the clock. An hour of drift silently turns them into different rules for part of the sample.
- Daily bars. If the day boundary is cut at a fixed hour, drift moves which minutes belong to which day. Highs, lows and closes change, and so do indicators built on them.
- Multi-asset joins. When you merge forex with an equity index, the two feeds only line up if both are in the same reference time. A one-hour error creates apparent lead-lag relationships that are artifacts.
- Cost and volatility estimates. Spreads and volatility follow the session cycle. An hour shift smears the cycle and misstates when the strategy is exposed to high-liquidity or low-liquidity periods.
The result is a backtest that looks profitable for the wrong reason, or looks unprofitable and gets discarded. Neither error announces itself.
How to detect timezone drift in minute bars
Run these checks in order. Each one needs only the timestamps and prices, and each is cheap on a decade of one-minute data.
1. The weekend-edge test
Markets that trade continuously through the week close and reopen on a fixed weekly schedule in their home time. For a feed in a fixed UTC offset, the last bar of the week and the first bar after the weekend will therefore move by an hour between DST regimes in the market's home zone. For a feed already converted to the market's own local time, they should not move at all.
For each week, take the timestamp of the last bar before the weekend gap and of the first bar after it. Plot both against the date. Two flat lines with one-hour steps tell you the feed is in UTC or a fixed offset. Flat lines with no steps tell you it follows local DST. Steps at dates that do not match the home market's DST rule tell you the feed follows a different zone's rule, which is the classic drift signature. Our forex session times guide lists how the session boundaries move with DST.

2. The activity-profile test
Average tick count or absolute return by minute of day, computed separately for each DST regime. Liquidity peaks and the opening spikes at major session starts are sharp, so a shift of exactly one hour between regimes is easy to see. If the profile in summer is the winter profile moved by 60 minutes, the offsets are wrong somewhere. This test also catches cases where the weekend edge is fine but the data was shifted in the middle of the week.
3. The transition-weekend audit
Open the bars around each transition date and count them.
- Missing hour in spring: a gap that is not a market closure, or an hour of data that was dropped because the conversion code treated it as a nonexistent local time.
- Duplicated hour in autumn: repeated timestamps, or an hour where two sets of bars were overwritten onto each other, leaving a hole elsewhere.
- Phantom weekend bars: bars with timestamps inside the weekly closure. They are often real bars shifted by an hour across the Friday edge. Our guide on removing weekend bars from forex data covers how to separate them from genuine thin trading.
Also check for duplicate timestamps and bars that sit off the one-minute grid. Both are symptoms of a bad merge or conversion.
4. Cross-feed comparison
When you have two sources for the same instrument, compute the lag at which their returns correlate best, month by month. Two clean feeds peak at zero lag. A lag that flips between zero and 60 minutes at DST dates points straight at the feed that follows a different zone rule.
5. Check against exchange schedules
For equities and index products, compare the first and last bar of each day with the exchange schedule. The NYSE publishes its core session of 9:30 a.m. to 4:00 p.m. Eastern and its holiday calendar, including 1:00 p.m. early closes such as November 27 and December 24, 2026. Its 2026 trading calendar also notes bank holidays when the NYSE trades while forex and interest-rate markets are closed, which matters when you validate timestamps across asset classes.
If the equity session in your file starts at 8:30 or 10:30 Eastern for part of the year, the timestamps are an hour off in that period.
A quick reference
| Symptom | Likely cause | Where to look |
|---|---|---|
| Weekly close moves by 60 minutes at DST dates | Feed in a fixed offset or UTC | Weekend-edge plot |
| Weekly close moves at dates that match no home-market rule | Feed follows another zone's DST | Compare dates with the IANA rules |
| Missing hour in March | Nonexistent local hour dropped | Transition weekend count |
| Repeated or overwritten hour in autumn | Ambiguous local hour resolved wrongly | Duplicate timestamps |
| Bars inside the weekend closure | Hour shift across the Friday edge | Phantom bar scan |
| Session open at the wrong clock time in half the year | Mixed offsets | Activity-profile test |
How to correct the errors without creating new ones
Fixing the clock is where many people make things worse, so go slowly.
- Identify the source zone first. Use the weekend-edge test to establish which zone and which DST rule the feed actually follows. Do not trust the label in the file name.
- Convert with a named IANA zone. Use a zone such as America/New_York, not a fixed offset. The named zone carries the historical rules. Be careful with the legacy Etc/GMT names: the sign is inverted from what most people expect, so Etc/GMT+2 is two hours behind UTC.
- Store UTC. RFC 3339 recommends UTC, or a numeric offset, because a local wall-clock time alone is ambiguous. Convert to local time only for display and session rules.
- Do not guess at ambiguous or nonexistent instants. Make your loader raise an error on the repeated autumn hour and the skipped spring hour, then resolve each case by evidence, such as the neighboring bars and the volume pattern. A silent guess shifts an hour of data and nothing downstream will flag it.
- Preserve valid timestamps. Only touch the periods the tests flagged. Rewriting the whole file because one year was wrong can break the years that were right.
- Document the assumptions. Record the source zone, the target zone, the date ranges you changed and the checks you ran afterward. Future you, or a colleague, will need them.
- Re-run every test. The weekend edge should now be constant in the target frame, the activity profile should match across regimes, and the bar counts on transition weekends should be explainable.
For developers, our walkthrough on normalizing time zones breaks the conversion into parts. If you trade in MetaTrader, the MT4 GMT offset guide shows how to align expert advisor timing with the server's offset.
Where clock drift still belongs
None of this makes hardware clock drift irrelevant. If you record your own live ticks, a server whose clock runs a few milliseconds fast, or a few seconds after weeks without synchronization, will produce timestamps that disagree with the exchange. For minute bars that error rarely crosses a bar boundary, but for event studies around news releases it can. Keep your collection machines synchronized to one time source and log the offset. Treat that as a separate job from the DST audit above, because the fixes and the tolerances are different.
Why we think the audit should happen before you buy
We collect and maintain minute-bar data for forex, metals, bonds and stock indices going back to 2014, and the question we hear most from quant traders is not about price. It is about time. Did the file follow New York, London or a broker server? What happened on the Sunday the clocks changed?
Our position is that a data set should answer those questions before you ask them. That is why we verify our data bar by bar, document adjustments, and keep the sets maintained so they import cleanly into MT4 and MT5. Our engineers are the people who collect the data, so when you ask about a timestamp convention you reach the people who built the file.
A one-hour error is small enough to survive a casual look and large enough to change a strategy's results. For both human and AI-driven backtesting we hold the data to a strict quality standard, because a model will learn an hour-shifted session as faithfully as a person will trade it.
Start
Skip the repair work
Auditing and repairing a decade of minute bars is a real project, and you repeat it for every new source you add. Our historical data sets are complete, clean one-minute bars since 2014 across forex, metals, bonds and stock indices, downloaded in one step and ready to import into MT4 and MT5. If you want the full catalog under one plan, the Annual Plan is 119 EUR per year.

If you build automated strategies, our expert advisors are designed to work with the same data, so your live timing and your backtest timing follow one convention.
FAQ
What is the difference between clock drift and timezone drift?
Clock drift is a difference in the rate at which two physical clocks run, measured in parts per million. Timezone drift is a change in the offset between a file's labels and true market time, normally exactly one hour at a DST date. Clock drift is a hardware matter; timezone drift is a conversion matter, and it is the one that moves minute bars into the wrong session.
Can I detect timezone drift without a second data source?
Yes. The weekend-edge test and the activity-profile test use only the one file. Plot the last bar before the weekly gap and the first bar after it against the date, and look for one-hour steps. Then compare average activity by minute of day in summer and winter.
Should I store timestamps in local time or UTC?
Store UTC, or a local time with an explicit numeric offset. RFC 3339 recommends UTC for interoperability because DST rules vary and can change by law. Convert to the exchange's local time only when you apply session rules, using a named IANA zone.
Does timezone drift matter for daily-bar strategies?
It can. If the daily bar is built from minute data with a day boundary at a fixed hour, drift moves minutes from one day into the next. Highs, lows and closes change, and so do indicators computed from them.
Sources
- Chapter 3: Distributed Systems: Synchronization, University of Helsinki course notes
- RFC 3339: Date and Time on the Internet: Timestamps
- NIST: Daylight Saving Time Rules
- IANA time zone database, tzdb-2023c Asia file
- NYSE: Holidays and Trading Hours
- NYSE: 2026 Trading Calendar
Recommended
- Forex Daylight Saving Time: Fixing DST Errors in Minute Data
- Avoid Hour Errors: Three Parts to Normalize Time Zones for Developers
- Forex Session Times: Hours, Overlaps and DST Shifts
- How to Fix the MT4 GMT Offset for Accurate EA Timing
Related resources
Explore BacktestMarket's Expert Advisor robots to put the ideas in this article into practice.
