Struggling with time format conversion

Hi, I keep hitting a wall when converting a time string into a more readable format.
My sensor.arteon_laatste_update returns the following state: “2021-01-06 19:59:00”
I want to convert this into a cleaner format such as “06 Jan 2021, 19:59”

I’ve already tried many conversions in my sensor template such as:

{{ as_timestamp(states('sensor.arteon_laatste_update')) | timestamp_custom('%d %b %Y, %H:%M') }}

But they all return the same time, except in UTV time instead of my local time (UTC+1)

This is all the time information from the template editor as well:

{{ now() }}
{{ now().tzinfo }}
{{ now().astimezone() }}
{{ now().astimezone().tzinfo }}
{{ utcnow() }}
{{ utcnow().astimezone() }}

{{ states.sensor.arteon_laatste_update.state }}

{% set strtext = states.sensor.arteon_laatste_update.state %}
{{ strptime(strtext, '%Y-%m-%d %H:%M:%S').timestamp()|timestamp_custom('%d %b %Y, %H:%M') }}

{{ as_timestamp(states('sensor.arteon_laatste_update')) | timestamp_custom('%d %b %Y, %H:%M') }}

Returns:

2021-01-06 21:43:00.009736+01:00
Europe/Brussels
2021-01-06 20:43:00.010128+00:00
UTC
2021-01-06 20:43:00.010715+00:00
2021-01-06 20:43:00.010808+00:00

2021-01-06 19:59:00

06 Jan 2021, 20:59

06 Jan 2021, 20:59

My configuration.yaml file also has the following included:

homeassistant:
  time_zone: Europe/Brussels

Any idea what’s wrong with my configuration (or perhaps template)? I’ve been going through so many other discussions about time issues but could never find an explanation for this behavior.

that should return your timezone, it does not. Something is not set correctly in your OS. What OS are you using?

I’m running HA on a Raspberry Pi 4B. So HASSOS release 2020.12.2.
I also checked my network switches and they all report the correct time (time is sync’s with internet)

try setting the TZ through the interface instead of configuration.yaml

That’s currently disabled becayse I have settings in my configurations.yaml overriding it.
But the interface does say my time zone is set to Europe/Brussels (which is where I am).

EDIT: I can also confirm that changing the time zone in my configurations file modifies the times represented in HA, including the time of the sensor I’m trying to reformat.

Even after removing all my custom configurations and changing the setting through the UI the time would still be off with 1 hour. The whole time-zone function seems to be very difficult to work with, especially on a R.Pi device where you cannot access the lower system to change the time there.
I modified my template to the below and that workaround seems to be ok. Hopefully I won’t have more issues with that later (i.e. when DST changes…)

{{ strptime( states.sensor.arteon_laatste_update.state, '%Y-%m-%d %H:%M:%S').timestamp() |timestamp_custom('%d %b %Y, %H:%M', false) }}

For others having issues with time, I installed an addon called Chrony and this corrected all times on my R.Pi 4B with Hass OS installed on it.
hassio-addons/addon-chrony: chrony - Home Assistant Community Add-ons (github.com)