Need to pass shell output to curl command in sh block of declarative pipeline

Hi ALL

I am trying to pass “date --rfc-3339=seconds” output to curl command body inside
declarative pipeline but not able to succeed as tried multiple way by defining in script block then inside sh block . Still nothing works . Can someone help me how i can pass the output of the shell command inside the curl .

 ReleaseDate= date --rfc-3339=seconds

            steps {
              sh '''
                    curl --location 'URL' \
                        --header 'Content-Type: application/json' \
                        --data '{
                        "component":"********",
                        "title":"XXXXXX",
                        "description":"YYYYYYY",
                        "status":"success",
                        "version":"1.10",
                        "release_time":"'${ReleaseDate}'"
}'
                    '''
                
            }
steps {
              sh '''
                    ReleaseDate=$(date --rfc-3339=seconds)
                    curl --location 'URL' \
                        --header 'Content-Type: application/json' \
                        --data '{
                        "component":"********",
                        "title":"XXXXXX",
                        "description":"YYYYYYY",
                        "status":"success",
                        "version":"1.10",
                        "release_time":"${ReleaseDate}"
}'
                    '''
                
}

Thanks for your response
I have tried this and the value is replaced properly but i got parsing error but when i hardcode the release_time value it works fine where as with variable its throwing error
Error Details mentioned below

	 "release_time":"2024-03-15 07:57:28-04:00"
}

{"code":400,"message":"Rejection(BodyDeserializeError { cause: Error(\"EOF while parsing a string\", line: 7, column: 50) })"}curl: (3) unmatched close brace/bracket in URL position 17:
07:57:28-04:00"
}

That is a problem independent of Jenkins.
Create a bash script in your machine with the contents of the sh step and run it and you will get the same error I guess.