import time


def format_time(datetime):
    """Format a datetime object standardly."""
    format_string = '%m/%d/%y %I:%M %p'
    if hasattr(datetime,'strftime'):
        return datetime.strftime(format_string)
    else:
        return time.strftime(format_string,time.gmtime(datetime))