Time zones, offsets, and fast time series aggregations

submited by
Style Pass
2023-11-19 14:30:03

My research group builds sensors to measure CO2 concentrations and air pollution around Munich. I'm currently hacking on a system to manage these sensors remotely and in real-time, called Tenta.

Our measurements are typical time series data. If we aggregate a sensor's measurements hourly, we might get something like this:

This chart looks simple at first glance. We group the measurements between 07:00 and 08:00 and take e.g. the average. Then we group the measurements between 08:00 and 09:00 etc.

Now, imagine that we have two sensors and we want the same chart calculated over both their measurements combined. What if these two sensors are in different time zones? What if we ourselves are in yet another one; How does an aggregation work in that case? Which measurements do we group together?

You're probably thinking: Felix, all your sensors are in Munich ... and you are, too. What's your problem? I should probably read up on this YAGNI thing, or KISS, or whatever ... Let's dive in!

Leave a Comment