Legend

Forum

Unread topics or posts

Topic

Unread posts

Locked

Announcement

Forums > Developers

How to decode the value of date files in the Backup XML



AuthorMessage
charles.cave

Posted: Apr 23, 2013
Score: 0



Hello,

I would like to parse the Backup XML to produce some special reports, but I don't know how the dates can be decoded.

For example:
<export_date>1366696711</export_date>
<duedate>1366632000</duedate>

How can I convert this number into YY, MM, DD and possibly HH and MM if I have enabled using times?

Thanks,
Charles
Jake

Toodledo Admin
Posted: Apr 23, 2013
Score: 0



The numbers are unix time stamps.

http://en.wikipedia.org/wiki/Unix_time
charles.cave

Posted: Apr 24, 2013
Score: 0



Thanks! I should be able to easily convert using the Python
datetime module:

import datetime
print(datetime.datetime.fromtimestamp(int("1284101485")).strftime('%Y-%m-%d %H:%M:%S'))
You cannot reply yet


To participate in these forums, you must be signed in.



Toodledo Forums > Developers