def format_datetime_for_report(timestamp_with_tz):
    "Format the datetime into a string for reporting.\n\n    Replace this function with datetime.isoformat(sep=' ', timespec='seconds') after we update python version to 3.6\n    "
    if (timestamp_with_tz is not None):
        return timestamp_with_tz.strftime('%Y-%m-%d %X')
    else:
        return None
Format the datetime into a string for reporting.

Replace this function with datetime.isoformat(sep=' ', timespec='seconds') after we update python version to 3.6
def format_datetime_for_report(timestamp_with_tz):
    "Format the datetime into a string for reporting.\n\n    Replace this function with datetime.isoformat(sep=' ', timespec='seconds') after we update python version to 3.6\n    "
    if (timestamp_with_tz is not None):
        return timestamp_with_tz.strftime('%Y-%m-%d %X')
    else:
        return None