ForumsDevelopersGet Current TimeStamp


Get Current TimeStamp
Author Message
edenmorris

Posted: Apr 12, 2011
Score: 0 Reference
is there a way to just ask the toodledo server what time it is?
Jake

Toodledo Founder
Posted: Apr 12, 2011
Score: 0 Reference
No, there is not. We intentionally left this out because we didn't want developers to use our server's current time to sync, since this will lead to errors.

Toodledo is in the EST timezone, so if you want to get our general time, you can convert to EST.
edenmorris

Posted: Apr 12, 2011
Score: 0 Reference
any idea how I can get a windows computer's timezone information? :)
Jake

Toodledo Founder
Posted: Apr 13, 2011
Score: 0 Reference
Sorry, I dont know how.
safire

Posted: Aug 20, 2011
Score: 0 Reference
I'd like to resurrect this question. It used to exist in the old 1.0 API via getServerInfo API call and I'm trying to update an application that is built of the old API and bring it up to 2.0.

I may not be thinking about this properly, but here's my logic:

Getting the server type is necessary to determine if there is a time offset between my computer and the server (ie. one of us is not properly NTP synced). That seems to cause problems when attempting to compare timestamps between tasks that were edited both locally and on the server.

I'd rather get the current server time, compare with local time to see if the times are off and use the offset for all time-based comparisons.
Jake

Toodledo Founder
Posted: Aug 22, 2011
Score: 0 Reference
Comparing times is not the best way to determine if a task has changed. If you do this, you are prone to having lots of sync errors. The best way is to use the "after" field when fetching tasks from the server and pass in the "lastedit_task" timestamp received from the previous API call.

It is explained in more detail here: http://api.toodledo.com/2/tasks/index.php
You cannot reply yet

U Back to topic home

R Post a reply

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