ForumsDevelopersLocal vs GMT time stamps in API2.0


Local vs GMT time stamps in API2.0
Author Message
andrew

Posted: Dec 11, 2010
Score: 0 Reference
Hi,

Although many of the timestamps in API2.0 are GMT Unix timestamps, some of them seem to be local times. These are start date / time, due date / time, and completed date. This is good, but it's not what it says in the documentation.

Regards,
Andrew
Jake

Toodledo Founder
Posted: Dec 13, 2010
Score: 0 Reference
Can you please provide an example or scenario that demonstrates this? I just re-looked at the code and ran a few tests of my own, and they all appeared to be GMT for me.
TaskUnifier Post deleted
TaskUnifier

Posted: Dec 14, 2010
Score: 0 Reference
I'm also facing problems with the timestamps of the tasks.

I think add/edit and get do not use the same timezones...
Jake

Toodledo Founder
Posted: Dec 14, 2010
Score: 0 Reference
I still can't reproduce this. It appears to be GMT to me. Can you please provide an example?
TaskUnifier

Posted: Dec 15, 2010
Score: 0 Reference
What I don't really understand :

In my account settings, I choose, for example GMT + 3.
A add a task with due date 15/12/2010 11:00.
The due date is in my time zone, right ?

When I get the tasks via the API, I retrieve a timestamp which gives me 15/12/2010 11:00 GMT.

I don't understand that, shouldn't it returns 15/12/2010 8:00 GMT ?
Then I add the three hours (GMT to GMT + 3) ?
Jake

Toodledo Founder
Posted: Dec 15, 2010
Score: 0 Reference
From the API documentation:


duedate : A GMT unix timestamp for when the task is due. The time component of this timestamp will always be noon.

duetime : A GMT unix timestamp for when the task is due. If the task does not have a time set, then this will be 0. If the task has a duetime without a duedate set, then the date component of this timestamp will be Jan 1, 1970.


All dates and times are stored as GMT. You set it as 11:00 and then retrieve it as 11:00. You should not have to adjust this by your timezone. The task will always be due at 11:00 no matter where you are. This is what is called a "floating time", since it is 11:00 in whatever timezone you are in.
andrew

Posted: Dec 18, 2010
Score: 0 Reference
Hi,

Yes this is a floating timestamp, not a GMT timestamp. I guess that's what you meant, but it's confusing for a developer (me, anyway!). Because I have to convert other times between local time and GMT time, but I don't have to do that with due times. So it would be clearer if the documentation didn't say GMT.

Anyway Toodledo does exactly what we want it to do, so thanks for the clarification.
You cannot reply yet

U Back to topic home

R Post a reply

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