def write_properties(props):
    root = Element('{%s}coreProperties' % COREPROPS_NS)
    for attr in ("creator", "title", "description", "subject", "identifier",
                 "language"):
        SubElement(root, '{%s}%s' % (DCORE_NS, attr)).text = getattr(props, attr)

    for attr in ("created", "modified"):
        value = datetime_to_W3CDTF(getattr(props, attr))
        SubElement(root, '{%s}%s' % (DCTERMS_NS, attr),
                   {'{%s}type' % XSI_NS:'%s:W3CDTF' % DCTERMS_PREFIX}).text = value

    for attr in ("lastModifiedBy", "category", "contentStatus", "version",
                 "revision", "keywords"):
        SubElement(root, '{%s}%s' % (COREPROPS_NS, attr)).text = getattr(props, attr)

    if props.lastPrinted is not None:
        SubElement(root, "{%s}lastPrinted" % COREPROPS_NS).text = datetime_to_W3CDTF(props.lastPrinted
                                                                            )
    return tostring(root)
Get a perf message for the given datetime.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/workbook/properties.py/write_properties--crossover with--dataset/ETHPy150Open quantopian/zipline/zipline/gens/tradesimulation.py/AlgorithmSimulator._get_daily_message