If you cannot install extensions, I just wrote a PL/PGSQL implementation for the time-based generator I could share.
Posted it to the repo as well.