import time


def epochToMW(timestamp):
    """
    Converts a unix epoch time to a mediawiki timestamp
    """
    if type(timestamp) == type(''):
        return timestamp
    struct = time.gmtime(timestamp)
    return time.strftime('%H:%M, %d %B %Y', struct)