import time


def gmtime2ams(unixtime):
    """Converts float unix time to GMT time in format '2011-12-11 09:00:21.555'"""
    msec = int((unixtime%1)*1000)
    tm = time.gmtime(int(unixtime))
    s = time.strftime("%Y-%m-%d %H:%M:%S", tm)
    return s + (".%03d"%msec)