'Set date/time value of child element having *prop_name* to *value*.'

def _set_element_datetime(self, prop_name, value):

    if (not isinstance(value, datetime)):
        tmpl = u"property    requires    <type    'datetime.datetime'>    object,    got    %s"
        raise ValueError((tmpl % type(value)))
    element = self._get_or_add(prop_name)
    dt_str = value.strftime(u'%Y-%m-%dT%H:%M:%SZ')
    element.text = dt_str
    if (prop_name in (u'created', u'modified')):
        self.set(qn(u'xsi:foo'), u'bar')
        element.set(qn(u'xsi:type'), u'dcterms:W3CDTF')
        del self.attrib[qn(u'xsi:foo')]
