An old phone recorded through the night of 1 November 2026, when New York clocks went from 01:59 EDT back to 01:00 EST. In the morning a script packed the night's clips into a zip with Python's zipfile and a second script, on the same machine, in the same time zone, unpacked them. Six of the eight clips came out paired up: two clips recorded an hour apart, stamped with exactly the same time.

This follows my earlier test, Python's zipfile Dated Every Extracted Camera Clip as Just Now, which moved a zip between time zones and listed daylight saving as untested. No zone change is needed this time. The repeated hour does it on one machine.

The night

Eight fake clips, 20 minutes apart, from 04:40 UTC to 07:00 UTC. In New York that is 00:40 EDT to 02:00 EST, and the hour from 01:00 to 01:59 happens twice. The script sets TZ=America/New_York itself, so it gives the same result anywhere. Python 3.10.12, Zip 3.0, UnZip 6.00, Linux.

cam1_00.mp4 04:40Z 00:40 EDT cam1_01.mp4 05:00Z 01:00 EDT cam1_02.mp4 05:20Z 01:20 EDT cam1_03.mp4 05:40Z 01:40 EDT cam1_04.mp4 06:00Z 01:00 EST cam1_05.mp4 06:20Z 01:20 EST cam1_06.mp4 06:40Z 01:40 EST cam1_07.mp4 07:00Z 02:00 EST 

What zipfile writes down

A zip entry's main timestamp is a DOS date and wall-clock time with no zone and no daylight-saving flag. Here is what zipfile stored:

cam1_00.mp4 2026-11-01 00:40:00 cam1_01.mp4 2026-11-01 01:00:00 cam1_02.mp4 2026-11-01 01:20:00 cam1_03.mp4 2026-11-01 01:40:00 cam1_04.mp4 2026-11-01 01:00:00 cam1_05.mp4 2026-11-01 01:20:00 cam1_06.mp4 2026-11-01 01:40:00 cam1_07.mp4 2026-11-01 02:00:00 

cam1_01 and cam1_04 were recorded an hour apart and the archive holds the same time for both. Same for 02/05 and 03/06. Nothing about the order survives in the time field, so no reader can tell them apart.

Four ways to pack, one way to fail

The full script is below. It packs the clips four ways, unpacks each on the same New York machine, and prints each clip's time minus the original, in seconds, clips 00 to 07:

delta in seconds, clips 00..07, written and read in New York: zipfile write, unzip read +0 +3600 +3600 +3600 +0 +0 +0 +0 zip command, unzip read +0 +0 +0 +0 +0 +0 +0 +0 zipfile + UT field, unzip read +0 +0 +0 +0 +0 +0 +0 +0 tarfile write, tarfile read +0 +0 +0 +0 +0 +0 +0 +0 zipfile read + date_time in NY +0 +0 +0 +0 -3600 -3600 -3600 +0 
  • zipfile write, unzip read: unzip read the three repeated wall times as the second 01:xx (EST), so the three EDT clips came back an hour late.
  • zipfile read, times put back from date_time with the zone passed in: this is the repair from the earlier post. Python's datetime took the first 01:xx (EDT), so the three EST clips came back an hour early. Passing the right zone name does not help when the wall time itself is ambiguous.
  • zip command: exact. It writes a UT extra field holding the time as UTC seconds, and unzip prefers that over the DOS time.
  • tarfile: exact. Tar stores UTC seconds.
  • zipfile plus a hand-built UT field: exact. This is the write-side fix that dev.to reader acemeridian posted under the earlier article, after rerunning it on Python 3.14.4. Build the ZipInfo yourself and attach the same UT field the zip command writes. I copied the idea into the script below.

The two broken readers fail in opposite directions. Which half of the night goes wrong depends on the tool, not on the clips.

Here are the clips that end up sharing a time after unzip:

After unzip of the zipfile-made zip, clips sharing one time: 01:00 EST ['cam1_01.mp4', 'cam1_04.mp4'] 01:20 EST ['cam1_02.mp4', 'cam1_05.mp4'] 01:40 EST ['cam1_03.mp4', 'cam1_06.mp4'] 

A viewer sorted by date now interleaves the first and second 01:00 hour. A "find what happened at 01:20" search returns two clips, and only one of them was recorded then. A sync tool that compares times sees six changed files.

The script

# Clips recorded across the night US clocks went back (1 Nov 2026, New York). # Zip them four ways on a New York machine, unpack on the same machine, # and compare each clip's time with the original. import os, shutil, struct, subprocess, tarfile, zipfile from datetime import datetime, timezone from zoneinfo import ZoneInfo os.environ["TZ"] = "America/New_York" NY = ZoneInfo("America/New_York") shutil.rmtree("clips", ignore_errors=True); os.makedirs("clips") start = int(datetime(2026, 11, 1, 4, 40, tzinfo=timezone.utc).timestamp()) names = [] for i in range(8): # every 20 min, 04:40Z .. 07:00Z t = start + i * 1200 n = "cam1_%02d.mp4" % i with open("clips/" + n, "wb") as f: f.write(os.urandom(512)) os.utime("clips/" + n, (t, t)); names.append(n) loc = datetime.fromtimestamp(t, NY) print(n, datetime.fromtimestamp(t, timezone.utc).strftime("%H:%MZ"), loc.strftime("%H:%M %Z")) def orig(n): return int(os.stat("clips/" + n).st_mtime) def report(label, folder): d = [int(os.stat(os.path.join(folder, n)).st_mtime) - orig(n) for n in names] print("%-34s %s" % (label, " ".join("%+d" % x for x in d))) # 1. zipfile write, unzip read with zipfile.ZipFile("py.zip", "w") as z: for n in names: z.write("clips/" + n, n) # 2. zip command subprocess.run("cd clips && zip -q ../cli.zip " + " ".join(names), shell=True, check=True) # 3. zipfile with a UT extra field written by hand with zipfile.ZipFile("py_ut.zip", "w") as z: for n in names: zi = zipfile.ZipInfo.from_file("clips/" + n, n) zi.extra = struct.pack("<HHBl", 0x5455, 5, 1, orig(n)) with open("clips/" + n, "rb") as s, z.open(zi, "w") as d: shutil.copyfileobj(s, d) # 4. tar with tarfile.open("clips.tar", "w") as t: for n in names: t.add("clips/" + n, n) print("\ndelta in seconds, clips 00..07, written and read in New York:") for z in ["py", "cli", "py_ut"]: shutil.rmtree("o_" + z, ignore_errors=True) subprocess.run(["unzip", "-q", z + ".zip", "-d", "o_" + z], check=True) report({"py": "zipfile write, unzip read", "cli": "zip command, unzip read", "py_ut": "zipfile + UT field, unzip read"}[z], "o_" + z) shutil.rmtree("o_tar", ignore_errors=True) with tarfile.open("clips.tar") as t: t.extractall("o_tar") report("tarfile write, tarfile read", "o_tar") # 5. zipfile read, times put back from date_time with the right zone name shutil.rmtree("o_fix", ignore_errors=True) with zipfile.ZipFile("py.zip") as z: z.extractall("o_fix") for info in z.infolist(): t = datetime(*info.date_time, tzinfo=NY).timestamp() os.utime("o_fix/" + info.filename, (t, t)) report("zipfile read + date_time in NY", "o_fix") print("\nDOS times stored by zipfile:") with zipfile.ZipFile("py.zip") as z: for i in z.infolist(): print(" ", i.filename, "%04d-%02d-%02d %02d:%02d:%02d" % i.date_time) print("\nAfter unzip of the zipfile-made zip, clips sharing one time:") seen = {} for n in names: seen.setdefault(int(os.stat("o_py/" + n).st_mtime), []).append(n) for t, ns in seen.items(): if len(ns) > 1: print(" ", datetime.fromtimestamp(t, NY).strftime("%H:%M %Z"), ns) 

Every output block above was printed by this script, unedited. The clip times sit on whole minutes, so the two-second rounding from the earlier post does not show up here.

When this bites a camera setup

  • Any recorder in a zone with daylight saving writes an ambiguous hour once a year, in autumn. In spring the skipped hour cannot be recorded at all, so that change does not cause this problem.
  • Overnight recording is the worst case. The repeated hour is 01:00 to 01:59 in the US and 02:00 to 02:59 in central Europe, the hours a home camera is most likely to be the only thing awake.
  • A zip made the next morning carries the problem forward, even if it never leaves the machine.

What I would do

  1. Check what wrote the archive. zipinfo -v archive.zip one_clip.mp4 shows a UT extra field modtime ... UTC line when the time is stored safely. No such line means the time is the DOS time only.
  2. When packing with Python, attach the UT field (step 3 in the script), or use tarfile.
  3. Put the recording time in the filename in UTC or with an offset, for example cam1_20261101T0500Z.mp4 or cam1_2026-11-01T01-00-00-0400.mp4. A filename survives every archive format, copy tool and cloud upload. A modification time does not.
  4. Don't try to repair it afterwards. Once two clips share a DOS time, no zone setting brings the order back. The information is gone from the archive.

Not tested

  • Only US Eastern time. Other zones with a repeated hour should behave the same way, but I ran only this one.
  • Only Info-ZIP unzip and Python on Linux. Windows Explorer, macOS Archive Utility and phone file managers are unchecked.
  • Only Python 3.10.12 for writing. acemeridian's 3.14.4 run of the earlier tests matched 3.10 on every point he checked, but I did not rerun this test on 3.14.

If you want an old Android phone recording in the background overnight, the app I make is Background Camera RemoteStream on Google Play. Nothing above depends on it.

A zip's DOS time has no zone and no daylight-saving flag, so the hour the clocks go back is stored twice, with nothing to tell the two apart. Store UTC: use the UT field, tar, or the filename.