import math
import time


def ut2isofs(ut, sep=' ', ndd=4):
    """UTC UT -> 'YYYY-MM-DD HH:MM:SS.1234'. No TZ or offset."""
    b, a = math.modf(ut)   # Fractional part, whole part.
    tm = time.gmtime(a)
    fs = (('%%.%df' % ndd) % b)[1:]
    return '%04d-%02d-%02d%s%02d:%02d:%02d%s' % \
        (tm.tm_year, tm.tm_mon, tm.tm_mday, sep, tm.tm_hour, tm.tm_min, tm.tm_sec, fs)