import time


def formatDate(when):
    """Given a time in seconds since the epoch, returns a date value in the
       format used by server descriptors (YYYY/MM/DD) in GMT"""
    gmt = time.gmtime(when + 1)  # Add 1 to make sure we round down.
    return "%04d-%02d-%02d" % (gmt[0], gmt[1], gmt[2])