import time


def format_date(date):
    """
    Creates a date string given a date object, in the format YYYY-mm-dd HH:MM:SS [offset].
    The offset will normally be in the -NNNN format (e.g., -0300).
    :param date: The date object
    :return: The generated string for the date object.
    """
    offset = time.strftime('%Z')
    if len(offset) > 5:
        offset = time.strftime('%z')

    return date.strftime('%Y-%m-%d %H:%M:%S ') + offset