Programming · free software · the open webSubscribe via RSS

Why Do Sensor Readings Need Observation Timestamps?

From the earlier reference collection. Read the current software blog.

Observation time tells readers when a measurement occurred and separates it from later collection or publication events.

Measurement time is not display time

A timestamp attached to a sensor reading should identify when the observation was made, if the source provides that information. Data may pass through a logger, network, import job, and dashboard before a person sees them. The time the page updates or the server receives a value does not necessarily equal the time the sensor measured it.

Suppose a sensor takes a reading at 08:10, a gateway receives it at 08:13, and a dashboard displays it at 08:20. Those are three useful events, but only the first is the observation time. Keeping them distinct lets readers recognize a delayed reading rather than mistaking it for a current measurement.

Use explicit time zones

A timestamp without a time zone can be hard to interpret, especially when data are compared across locations or systems. Show a named zone or a clear offset, and document the convention used in machine-readable data. If a system stores timestamps in a standard zone and displays local time, identify the display zone.

This matters around clock changes and when users compare data from places with different local times. A record labeled only “1:30” may refer to more than one moment on a day when clocks shift. A full date and unambiguous zone prevent avoidable confusion.

Support aligned comparisons

Observation timestamps let users compare measurements taken at similar times. Two nearby stations might show different values because one reports every minute and the other every hour. Without timestamps, a user may put a recent sample beside an older one and interpret the gap as a spatial difference.

For summaries, specify the period covered and the method used. An hourly average should identify which hour it summarizes and whether the interval is based on local clock time or another convention. A single timestamp on an aggregated value may suggest an instantaneous sample unless the interface explains the aggregation.

Preserve timing through processing

Do not discard source observation times when moving data between systems. If an import has its own receipt timestamp, store that separately. If a timestamp must be converted or corrected, preserve the original representation and record the transformation so later users can audit the change.

When the source provides no observation timestamp, communicate that limitation. A collection or publication time can still be useful, but should be labeled accurately. Clear time semantics turn a bare value into evidence readers can place in context and help prevent incorrect claims about what was happening “now.”

Suggest a correction · All posts