No need for the time_t time = Time.now(); as there is an overload for format() that only takes a string (or not even that for the default format, which can be set via Time.setFormat()) which works on the current time.
And you should use double quotes (") for strings. Single quotes (') are meant for single characters.
In your original code, you tried to pass a time_t variable as a String into your function, which can’t work.