from datetime import datetime
import pytz


def timestamp(local=False):
    """Timestamp in ISO format

    If ``local`` is set to True, timestamp is returned in local timezone. By
    default, it returns the timestamp in UTC timezone.

    Returns:
        str: Timestamp string in ISO format
    """
    return (datetime.now().isoformat()
            if local else
            datetime.now(pytz.utc).isoformat())