import time


def iso_time(value=None):
    """Format a timestamp in ISO format"""

    if value == None:
        value = time.localtime()
    tz = time.timezone / 3600
    return time.strftime('%Y-%m-%dT%H:%M:%S-', value) + '%(tz)02d:00' \
        % vars()