source: xmlrpcplugin/0.10/tracrpc/util.py

Last change on this file was 1735, checked in by Alec Thomas, 17 years ago

XmlRpcPlugin:

Applied patches from gotoh and stp, thanks. Closes #434 and #845.

File size: 224 bytes
RevLine 
[1188]1import time
2
3def to_timestamp(datetime):
4    """ Convert xmlrpclib.DateTime string representation to UNIX timestamp. """
[1735]5    return time.mktime(time.strptime('%s UTC' % datetime.value, '%Y%m%dT%H:%M:%S %Z')) - time.timezone
Note: See TracBrowser for help on using the repository browser.