Template with date/time is one hour off

I created a template to show the last updated time in Y-M-D H:M:S format, like this:
{{ states.sensor.sun2000_6ktl_l1_102150268845.last_updated.strftime('%Y-%m-%d %H:%M:%S') }}

On the top, the result of the template, and on the bottom, the developer tools state:

Why is this one hour off?

Maybe it’s a time zone and Daylight Savings Time issue? Try wrapping it in the as_local function:

{{ as_local(states.sensor.sun2000_6ktl_l1_102150268845.last_updated).strftime('%Y-%m-%d %H:%M:%S') }}