Privacy settings

You decide whether we may use PostHog to improve this website. You can change your choice at any time.

Necessary features · always active

We store your privacy choice so we can respect it on future visits.

You can change or withdraw your choice at any time using “Privacy settings” in the footer. Privacy information

urbanOS
All articles

Keep municipal sensor data comparable across daylight-saving changes

Two measurements can both be labelled 02:15 and still represent different instants. UTC, maintained time-zone rules, and separate event and receipt times keep municipal sensor reports traceable when the clocks change.

Paper collage with two clocks and split timelines representing a repeated hour during a daylight-saving change.
The central question

How should a municipality handle timestamps from different sensor systems so daylight-saving changes do not distort reports, comparisons or incident timelines?

A parking sensor may report “02:15” twice on the last Sunday in October. Both values can be correct: in Germany, local time moves back from summer time to standard time that night, so the hour between 02:00 and 03:00 occurs twice. In spring, one hour is skipped. A municipality should therefore store each measurement as a unique instant, preferably in UTC or as an RFC 3339 timestamp with a numeric offset. Local reports also need the applicable time-zone rule, such as Europe/Berlin. Event time and receipt time belong in separate fields. Convert to local time only for display and domain-specific grouping.

That separation keeps observation time distinct from delivery time. The data contract also needs to define device-clock accuracy, offset and time-zone information so readers can assess what each value means.

A timestamp carries three different meanings

A municipal data flow often contains at least three times. Event time says when a sensor observed a change or formed a measurement. Receipt time says when a gateway, platform or application received the message. Display time is the local clock time calculated for a report. Keep these concepts separate even when a supplier exposes only one time value.

The OGC SensorThings API standard uses, among other properties, phenomenonTime for the time of the observed phenomenon and resultTime for the time when the result was generated. If phenomenonTime is missing from an Observation, the standard assigns the current server time to that field; a missing resultTime is treated as null. This gives teams a concrete warning during interface acceptance: a server-assigned time does not prove when the sensor made its measurement (OGC SensorThings API, Version 1.1).

Where the source allows it, a trustworthy observation should carry the measurement time, receipt time, raw timestamp, offset or time-zone identifier, and a time-quality indicator. Each field answers a different question, such as “When was this temperature measured?” or “How long did the packet spend in the radio network?” If a device sends only a local clock reading, the integration should flag that limitation instead of silently inventing a seemingly precise UTC instant.

UTC identifies an instant; a time zone explains the calendar

A UTC instant works well as a common reference for storage, ordering and cross-system comparison. RFC 3339 describes a standard Internet timestamp using Z or a numeric offset; an offset such as +02:00 maps the local value unambiguously to UTC. The RFC recommends UTC for better interoperability and warns against unqualified local times and ambiguous time-zone abbreviations (RFC 3339, Section 4.3).

An offset says how that particular clock reading relates to UTC. It does not explain which rule will apply to the same place next week or next year. A time zone is a sequence of local rules for a region. RFC 9557 explains that a local time near a clock change can correspond to zero or multiple instants. A calculation such as “the following day at the same local time” therefore needs a named time zone, not just the current offset (RFC 9557, Section 2).

The IANA Time Zone Database records historical and predicted civil-time rules by location. Its data changes when political decisions alter time-zone or daylight-saving rules. IANA also cautions that the database is not authoritative in every detail and may contain errors (IANA Time Zone Database: Theory and pragmatics). In practice, a municipality should maintain the IANA identifier for each site or operational area, record which database version it uses, and include updates in routine operations. An offset alone is insufficient for local day and hour reports.

The autumn hour repeats, while the spring hour disappears

Under Germany’s Summer Time Ordinance as consulted on 31 October 2026, summer time begins on the last Sunday in March when 02:00 Central European Time advances to 03:00. On the last Sunday in October, 03:00 summer time moves back to 02:00 Central European Time, repeating the hour from two to three. The ordinance historically labels the two occurrences 2A and 2B (Summer Time Ordinance, Section 2).

A parking-usage report therefore needs an explicit decision about what an “hour” means. A daily report can contain 23, 24 or 25 hours that actually elapsed. During the repeated autumn hour, the report can show both intervals separately with their offsets or deliberately combine them into one local clock hour. In either case, its legend should state the rule. During the missing spring hour, no observations exist for a local interval that did not occur. Label the missing local hour as not occurring; reserve zero for a measured value.

The team should never deduplicate raw events at import time using the formatted clock value alone. Two readings with the same wall-clock time can be separate events because their offsets differ. A key based on device, event identifier and unambiguous timestamp is more suitable. If a source provides neither an offset nor a unique identifier, the data owner must decide whether to keep the readings separate, mark them uncertain, or exclude them from hourly aggregation.

Handle delayed messages and inaccurate device clocks separately

A packet that arrives ten minutes after measurement is delayed; it is not automatically wrong. A packet that arrives promptly can still contain an inaccurate device time. Store both values and define how far back late measurements may revise each use case. A live dashboard can display a provisional value immediately, while a monthly report may incorporate late data retrospectively. Mark corrections so operational teams can explain a number that has already been exported.

Device clock health needs its own operational check. RFC 5905 describes NTP as a protocol through which systems synchronize clocks with time sources and estimate their offset (RFC 5905, Section 2). Clock synchronization and radio availability are separate operational questions. Operators should document which devices synchronize, how often they reconnect, what drift is acceptable offline, and how a sensor sets its clock after a restart. For devices without a stable time source, gateway receipt time is useful for delivery analysis. Label it as receipt time.

An acceptance test for real time errors

A good test checks more than whether an ISO timestamp can be parsed. It checks whether the domain report and the operations team mean the same instant. Include at least these cases in acceptance:

  1. Ordinary local time: two timestamps intended to represent the same instant, one with Z and one with the German offset, resolve to the same UTC instant.
  2. Repeated hour: two autumn values with the same local clock reading and different offsets remain two events.
  3. Nonexistent hour: a fabricated spring timestamp in the skipped interval is rejected or flagged as ambiguous instead of being shifted automatically.
  4. Delayed packet: event time and receipt time remain separate, and the delayed observation changes an analysis according to the agreed correction policy.
  5. Missing offset: ingestion marks the time incomplete or applies a documented source-specific rule.
  6. Clock error: an implausible jump or difference from gateway time creates a reviewable quality state, not a silent correction.
  7. Rule update: a test with an updated time-zone database shows whether an update changes past local representations and whether future appointments use the revised rules.

This set also works as a decision rule. UTC is often enough when a report only needs the order of past measurements. A report for “weekdays at 08:00 local time” or a municipal operating hour also needs the site and a named time zone. If the source cannot provide an unambiguous measurement time, the report must make that uncertainty visible.

A platform can connect sources; data owners still define time

For a municipality or operator with sensors on multiple networks, urbanOS is a particularly strong fit when the practical problem is making data sources usable through shared dashboards, applications and open interfaces. urbanOS is an Urban Data and Urban Intelligence platform for smart cities; it describes connections to different sensor networks, dashboards, and open API and GeoJSON/GPX interfaces on its urbanOS platform page. This suits teams that need to bring observations from several responsibilities together in domain views. The municipality still has to define in its integration contract which field means measurement time, which means receipt time, which time zone belongs to a site, and how an application handles the repeated hour. Accurate device clocks and complete source timestamps remain the responsibility of the operator and integration team.

Before approving a dashboard, the data owner should confirm four points in writing: the stored measurement instant is unambiguous; receipt time remains separately traceable; local reports use a maintained IANA time zone; and missing, late or suspicious times are visibly flagged. Resolve missing answers in the data contract or device configuration first.

Sources

Sources and further reading

  1. RFC 3339: Date and Time on the InternetIETF
  2. RFC 9557: Timestamps with Additional InformationIETF
  3. IANA Time Zone Database: Theory and pragmaticsIANA
  4. Summer Time Ordinance, Section 2Federal Ministry of Justice
  5. OGC SensorThings API, Part 1: Sensing, Version 1.1Open Geospatial Consortium
  6. RFC 5905: Network Time Protocol Version 4IETF

More articles

Textile illustration of a tree, tank and building in green identity loops, with a blue sensor bead beside an empty yellow socket.
Interoperability

Keep sensors, monitoring points and municipal assets linked

A practical mapping model for municipal sensor inventories: stable identifiers, traceable replacements, shared observation targets and checked exports.