'Replace seconds in date variable with present seconds in date

I get date as input to the shell script:

2021/12/21 09:09:10

Then, n seconds are added to the given date time variable, and formatted.

Date would be:

2021/12/21-09-09-11

But I would like to replace the time in the string with the current time.

Current date:

Thu Feb 17 09:02:57 EST 2022

Expected result:

2021/12/21-09-02-57


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source