ForumsDevelopersUndocumented API feature: unix timestamps input to API calls


Undocumented API feature: unix timestamps input to API calls
Author Message
CarlSheppard

Posted: Aug 27, 2009
Score: 0 Reference
I've found that the API calls that take date-times as input, such as the "modafter" input of getTasks, etc., can be set to unix timestamp integers instead of the "YYYY-MM-DD HH:MM:SS" strings mentioned in the API documentation (note this is not effected by the "unix=1" flag, which only seems to effect date-times the output XML). This is great, allowing my app to not have to deal with server timezone. But it's not mentioned in the API doc. and so it feels like using an undocumented feature that may go away in the future. Please add a blurb about this to the API docs to make it official.
Jake

Toodledo Founder
Posted: Aug 28, 2009
Score: 0 Reference
Yes, you can submit a unix timestamp or a formatted date for many of the date options, but not all of them. We will add this to the API docs soon.
maldworth

Posted: Nov 11, 2009
Score: 0 Reference
my question falls under this topic. In getTasks, the following descriptions are given, only one of which appear to take in unixtime. Can you please confirm if ALL of them take unixtime, or which ones definitively do? Thanks

# before : A date formated as YYYY-MM-DD. Used to find tasks with due-dates before this date.
# after : A date formated as YYYY-MM-DD. Used to find tasks with due-dates after this date.
# startbefore : A date formated as YYYY-MM-DD. Used to find tasks with start-dates before this date.
# startafter : A date formated as YYYY-MM-DD. Used to find tasks with start-dates after this date.
# modbefore : A date-time formated as YYYY-MM-DD HH:MM:SS. Used to find tasks with a modified date and time before this date and time.
# modafter : A date-time formated as YYYY-MM-DD HH:MM:SS or a unix timestamp. Used to find tasks with a modified date and time after this date and time.
# compbefore : A date formated as YYYY-MM-DD. Used to find tasks with a completed date before this date.
# compafter : A date formated as YYYY-MM-DD. Used to find tasks with a completed date after this date.
Jake

Toodledo Founder
Posted: Nov 12, 2009
Score: 0 Reference
The documentation is correct. modafter is the only one that supports time.
You cannot reply yet

U Back to topic home

R Post a reply

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