[Silva-general] How do I convert silva-extra creationtime to RFC-822?

Jon Bowlas j.bowlas at ucl.ac.uk
Fri Mar 3 15:50:04 CET 2006


>
>   dt = DateTime(creationdate)
>   return dt.rfc822()
>
>
Much appreciated Nico,

I changed my code to:

mdbinding = self.service_metadata.getMetadata(self)
creationdate = mdbinding.get('silva-extra', 'creationtime')
crdate = creationdate.rfc822()
xml.write('<pubDate>%s</pubDate>\n' % quote_xml(crdate))

Works a treat.

Cheers.

jon




More information about the Silva-general mailing list