Return a string representing the current date and time,
    in ``YYYY-MM-DDThh:mm:ss`` or ``YYYY-MM-DDThh:mm:ss+hh:mm`` format

    :param boolean time_zone: if ``True``, add the time zone offset.

    :rtype: string

def datetime_string(time_zone=False):
    """
    Return a string representing the current date and time,
    in ``YYYY-MM-DDThh:mm:ss`` or ``YYYY-MM-DDThh:mm:ss+hh:mm`` format

    :param boolean time_zone: if ``True``, add the time zone offset.

    :rtype: string
    """
    time = datetime.datetime.now()
    template = u"%04d-%02d-%02dT%02d:%02d:%02d"
    if time_zone:
        template += u"+00:00"
    return template % (
        time.year,
        time.month,
        time.day,
        time.hour,
        time.minute,
        time.second
    )