# How to handle daylight savings time when displaying logged data

If we have a system that measures and logs a users energy consumption, and then displays this data on an hourly basis, how should you display the anomalies that occur when shifting to/from daylight savings time? The problem is that if you only log data to an hour, you will get an empty hour, or an hour getting data logged to it twice.

Consider this to be the ordinary case:

When shifting to/from daylight savings time this would occur:

or:

Any good suggestions on how to explain this to the user?

I've encountered this exact issue myself in a previous project and there were a few main things we decided on:

1. Time—being continuous—should be shown as such, regardless of the fluctuations in local times
In this case, your third example violates this requirement.

2. All times should be correct so they can be correlated to real-life experiences
e.g. "Why was the energy usage so high at 3 AM when there was nobody home?"

3. Every hour on the chart should represent exactly one hour of real time
In this case, your second example violates this requirement, since the middle "hour" actually represents two hours.

The solution then becomes one where most days have 24 hours but some have 25 and others 23.

In effect that would mean your second chart would have four vertical bars with the labels "00:00–01:00", "01:00–02:00", "01:00–02:00" and "02:00–03:00", and your third chart would have just two bars with the labels "00:00–01:00" and "02:00–03:00".

While I acknowledge that it's slightly confusing to see two bars that represent different actual hours with the same exact label and to have an entire hour skipped in the chart, that's exactly how the day is experienced by the user, so it's much more meaningful than the alternatives you've presented.

It's also (relatively) technologically simple, since your data is almost certainly stored based on UTC time; you draw each chart column based on each hour of real data, and then simply translate the labels to the user's local time.

• Also use precise labels to differentiate. 2:00AM EST is a completely different time from 2:00AM EDT, so label it as such. – pdubs Dec 6 '13 at 17:47