javascript: smallest code to convert seconds to time
155 147 characters.

textTime=(t,z,m,x)=&gt;(x=[t/3600,t/60%60,t%60].map((t,i)=&gt;(!z||t|0)&amp;&amp;~~t+["hrs","min","sec"][i]+"."||0).slice(0,2+!m),(z?x.filter(x=&gt;x):x).join(" "))


If the parameters made a little more sense, yes, it would be fewer.

Non-ES6, changing the name and using globals like @C5H8NNaO4 did, at 183 characters:

function t(t,z,m){return(x=[t/3600,t/60%60,t%60].map(function(t,i){return(!z||t|0)&amp;&amp;~~t+["hrs","min","sec"][i]+"."||0}).slice(0,2+!m),(z?x.filter(function(x){return x}):x).join(" "))}