Skip to content

Time and clock

Luke Switzer edited this page Nov 25, 2026 · 2 revisions

A node keeps the time with a DS3231 real-time clock, a chip that keeps counting while the node has no power. The clock keeps UTC. The node shows local time once GPS places it in a known time zone.

Why the clock matters

  • Scheduled scans need the time. A scheduled scan runs only after the node knows the time, from GPS or its real-time clock. See Scheduled scans.
  • Logs, capture file names, results and heartbeats show local time.
  • The Results timeline dates each event with the time the node recorded it. A wrong clock puts events on the wrong dates.

Set the clock

Use any of these methods. The clock is set when you flash the node, and you can set it later.

Method Where What happens
Command-line flasher Dist/flashAntihunter.sh Sends SETTIME: with the computer's time
PlatformIO Post step scripts/set_rtc_time.py Sends SETTIME: with the computer's time
Web flasher Connect & Configure Sends SETTIME: with the browser's time after the node boots
Web UI System tab → Diagnostics → Hardware → Set RTC from this browser's clock Sends the browser's time to the node. The page shows RTC set when it works
USB serial Type SETTIME:<unix seconds> Replies OK: RTC set. Works on USB only, not over mesh

The number in SETTIME: is a Unix time in seconds, and it must be after 2021-01-01. For example, SETTIME:1767225600 sets the time to 2026-01-01 00:00 UTC. See USB serial.

If the clock has lost power, or reads a year before 2025 or after 2035, the node sets it to the time of its firmware build at boot.

GPS sync

GPS sets the clock on its own once the node has a fix. These rules apply.

  • The node syncs only when the GPS date and time are valid.
  • It does not sync while a triangulation runs.
  • After the first sync, it syncs at most once an hour.
  • It changes the clock only when the clock is more than 1 second off. The first sync after boot always runs.
  • Each sync sends RTC_SYNC: GPS over the mesh, if the mesh is on, and writes a line to the SD card log.

Time zone from GPS

When GPS places the node inside one of these zones, the node shows local time with daylight saving:

  • Hawaii
  • Alaska
  • Arizona
  • Saskatchewan
  • US/Canada Pacific
  • US/Canada Mountain
  • US/Canada Central
  • US/Canada Eastern
  • UK/Ireland
  • Central Europe
  • Eastern Europe

Outside these zones, and before the first GPS fix after boot, the node shows UTC.

Clone this wiki locally