You don't need to use `echo` at any point here.
Using the subshell, you're executing the output of the `seconds` function which is generally ill-advised as it can cause unexpected behavior like you're seeing.
Instead, simplify your function to run the `date` command itself:
#!/bin/bash
seconds () {
date -d "1970-01-01 $1+0" "+%s"
}
seconds 00:00:02.00
Output: `2`