ForumsDevelopersServer time


Server time
Author Message
Benjamin Leclerc

Posted: Feb 11, 2011
Score: 0 Reference
Hi,

In API 1.0, there was a field with the server time.
In API 2.0, I don't find this field anymore.

This is a problem, because if the computer which syncs hasn't exactly the same hour, it could produces sync errors.

Another thing, in the get tasks method, the field modafter and modbefore, are you sure these are GMT date ? I have just tested that and I really doubt these are GMT dates.

Btw, timeron, is it a "normal" date or a GMT date, just want to be sure the doc is correct.

Thanks


This message was edited Feb 11, 2011.
Jake

Toodledo Founder
Posted: Feb 11, 2011
Score: 0 Reference
All of the unix timestamps are in GMT. I just checked it again, and I am pretty sure. If you have a series of steps that indicate otherwise, please share them with us.

API 2.0 no longer has the server time field because it isn't necessary for syncing and was actually leading people down a path that was causing more sync problems that otherwise. You do not need to know the server time to sync. If you are concerned about how to generate the value for modafter, you can allow us to generate it for you via the account/get.php call which gives you the "lastedit_task" timestamp. All you need to do is cache this and you'll have a record of the last time you synced. You could also use the largest of the modified timestamps returned from the previous tasks/get.php call that you ran.
TaskUnifier

Posted: Feb 11, 2011
Score: 0 Reference
Ahhh, think I understand my problem.

Does it mean that the timestamps (lastxxx_xxx) in the account/get.php are also GMT dates ?
Jake

Toodledo Founder
Posted: Feb 11, 2011
Score: 0 Reference
Yes, all dates are GMT
TaskUnifier

Posted: Feb 11, 2011
Score: 0 Reference
Ok, thank you.
It wasn't clear (for me at least) in the API doc.

Sometimes it is mentionned "unix GMT timestamp" and sometimes "unix timestamp", I thought there was a difference.


This message was edited Feb 11, 2011.
Jake

Toodledo Founder
Posted: Feb 13, 2011
Score: 0 Reference
That is us just being sloppy with the documentation. All timestamps should be in GMT.
You cannot reply yet

U Back to topic home

R Post a reply

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