root/xmlrpcplugin/0.10/tracrpc/util.py
| Revision 1735, 224 bytes (checked in by athomas, 2 years ago) |
|---|
| Line | |
|---|---|
| 1 | import time |
| 2 | |
| 3 | def to_timestamp(datetime): |
| 4 | """ Convert xmlrpclib.DateTime string representation to UNIX timestamp. """ |
| 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 browser.
