Minor: Remove tidFromDate() completely

The function is available in lib/dbutils.js which is imported in the
script, so users can access it by using dbu.tidFromDate()
Test Script: Remove the duplicate definition of tidFromDate()

The function definition has been copied from lib/utils.js , so in order
not to have duplicated code, import the dbutils module and use the
aforementioned function directly.