How do you set as a time value in an automation

I would like to adjust the start time on my car’s block heater based on the forecast low. I would like to start it 30 mins plus 5 minus for each negative Celsius degree. I’m having trouble with the syntax, how do I assign a time value?

my first try at this is

- id: '1700689457882'
  alias: NW middle adjust start time
  description: ''
  trigger:
  - platform: state
    entity_id:
    - input_datetime.nw_middle_truck_drive_time
    attribute: timestamp
  condition: []
  action:
  - service: input_datetime.set_datetime
    data:
      time: "{{ ( state_attr( 'input_datetime.nw_middle_truck_drive_time',
                                       'timestamp') | int 
                      - 1800
                      - ( ( states( 'sensor.winnipeg_low_temperature' ) | int ) * -300 )
                   ) }}"
  action:
    - service: input_datetime.set_datetime
      data:
        timestamp: >
          {% set temp_offset = states('sensor.winnipeg_low_temperature' ) | int(0) * -300 %}
          {{ state_attr('input_datetime.nw_middle_truck_drive_time', 'timestamp')
            - 1800 - temp_offset }}

The value that is set is off by 6 hours. I’m in “(GMT-06:00) Central Time - Winnipeg”. If it add 21600 seconds ( 6 * 60 * 60 ) it works. Why is this? I’m just removing time from the other value?