method date_to_ts can now take time as an optional second parameter