No, it would be:
"start": {
"script": {
"lang": "painless",
"source": """
LocalDateTime.ofEpochSecond((doc["timestamp"].date.getMillis()-((doc["bucket_span"].value * 1000) * params.padding)) / 1000, 0, ZoneOffset.UTC).toString()
""",
"params": {
"padding": 10
}
}
},
"end": {
"script": {
"lang": "painless",
"source": """
LocalDateTime.ofEpochSecond((doc["timestamp"].date.getMillis()+((doc["bucket_span"].value * 1000) * params.padding)) / 1000, 0, ZoneOffset.UTC).toString()
""",
"params": {
"padding": 10
}
}