Last occurance of time relative to now()
The logic is similar to what @Daniel already posted, but this is a bit faster (twice as fast in my tests on pg 9.3):

SELECT CASE WHEN now()::time &gt; time '16:05'
            THEN now()::date + time '16:05'
            ELSE (now()::date - 1) + time '16:05' END AS ts;


now() is the Postgres implementation of the SQL standard CURRENT_TIMESTAMP (which you can use as well). I use now(), because it is shortest and fastest. CURRENT_TIME and CURRENT_DATE are implemented with now() as well.

Note that you get a timestamp [without time zone] that is interpreted according to your current time zone setting.