How to add duration of time in lambda?

Hi, I have a heating controller with a boost function where I want to use a text sensor to publish the off-time of the boost.
For example if a user hits the 1hr boost button at 13:45, the text sensor should publish 14:45 to HA.
In the example below I can publish the on-time of the boost button-press, but what is the best way to convert that time by adding the duration of the boost?

  - id: heating_downstairs_1hr
    mode: restart
    then:
      - switch.turn_on: brb_ds_direct
      - light.turn_on:
          id: button_light_switch_1
          effect: "HeatingActive"
          brightness: 90%
      - text_sensor.template.publish:
          id: text_time_ds_heating
          state: !lambda |-
              char str[17];
              time_t currTime = id(ds1307_time).now().timestamp;
              strftime(str, sizeof(str), "%H:%M", localtime(&currTime));
              return  { str };
      - logger.log: "BoilerRelayBoard DS on"
      - delay: 60 min

I have a feeling that I need to convert now() into an epoc and then add the equivalent of 60 mins, but is there a more effective way?

Also, the time being published to HA is in GMT (we are GMT+1 summertime currently), how is that best handled in Esphome, or do I need to handle it within HA instead?

If I understand correctly then you’d like to receive the current time + 1 hr after pressing that boost button?

Moving the delay up to before the publish action would delay the lamba. Once it’s executed the date/time by then would be reported, so automatically +1hr. But if you want to publish the “prognosed” boost end time right after pressing the button, you can simply add 3600 (=1 hr) to the currTime:

const time_t oneHourInSec = 3600;
time_t currTime = id(ds1307_time).now().timestamp + oneHourInSec;

Regarding UTC/local time, it’s better to let HA handle that. Easiest is to return an ISO-8601 date/time string like this:

char str[21]; // larger buffer
strftime(str, sizeof(str), "%Y-%m-%dT%H:%M:%SZ", gmtime(&currTime));

Value would be something like 2023-04-05T01:40:12Z and Z means Zulu-time or Zero-hour-offset (=UTC).

Thank you very much. Those lines did exactly what I needed. It now publishes the off-time when I trigger the 1hr boost and then updates it again when I trigger the 2hr boost.