The time in the sqlite database is in local time instead of UTC, which leads to inconsistent data when time changes from CEST to CET.
E.g. this value is stored every minute:
I would guess that, since SQLite doesn’t have a dedicated date time type, you need to manage the time zone directly, as indicated in the link above. If you use functions that return UTC by default, you will get the behavior that I think you want.
I’m not accessing sqlite directly, it is all through openhab. The data is stored by persistence and the timezone information is then already lost. And if I retrieve it in a plot it looks like this:
I love that chart. It took me a minute to parse what was going on… thanks for posting it.
I see from the discussion under the link posted by @Wolfgang_S that there’s more going on here than I understood. Many developers are tripped up by the differences between different database’s handling of date/time data—indeed, older Java date/time constructs are also confusing. I see I have a lot to learn before I have much useful to contribute!