`${tests_time:0:${#tests_time}-9}` should be the same as `${tests_time:0:-9}`.
`${tests_time:${#tests_time}-9:…}` should be the same as `${tests_time:0-9:…}` (you need the leading 0 because `${parameter:-word}` is the syntax for *Use Default Values.*)