06-07-2017 04:43 AM
Hi,
I'd like to search for records edited after a certain date. Strange thing is, I seem to query that like this for getting every record edited after 14:00 on 7th of June:
/api/companies?$filter=(edited gt 2017-06-07T14:00:00Z)
But i don't get anything, and I've edited a record at 14:01.
However, when I lower the hour by 2:
/api/companies?$filter=(edited gt 2017-06-07T12:00:00Z)
I do get the record. And notice this:
...
"edited": "2017-06-07T14:01:04+02:00", // notice the +2 !!
...
What does the +2 mean, and am I doing something wrong here? BTW I live in the Netherlands, which is GMT+1, not +2, if it has to do anything to do with that.
06-16-2017 07:45 AM
Hello,
The +2 means the offset from UTC. The API displays all time in local time of the server, in your case "2017-06-07T14:01:04+02:00". The record is stored in UTC: "2017-06-07T12:01:04+00:00". The API allows you to search using any timezone
?$filter=(edited gt 2017-06-07T12:00:00Z)
?$filter=(edited gt 2017-06-07T14:00:00+02:00)
Now to the strange thing. Why is the UTC offset +02 when your timezone is set to +01. I am assuming that the server that the API resides on is set to (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna. I have been able to reproduce this same issue as well in that timezone in Act! V18.2.
Could you provide me more specifics on your environment so I can see if I can make since of this:
What version of Act!
What version of API
The API's host server's timezone:
Ways the Timezone settings changed on the server recently (it does require an Act! for Web application pool reset).
The Daylight saving settings. Is your machine configured: Set time zone automatically and Adjust for daylight saving time automatically.
06-18-2017 11:48 PM
Hi Stephen,
thanks for your answer. So 'Z' at the end means UTC (+0) and we can also search with + or - n seconds offset from UTC. Didn't know that.
And for the +2, how stupid of me, it's during the daylight savings period we are actually at UTC+2. indeed (or Zomertijd (summer time) as we call it).
The server is on Act! v18.2 and the newest API.1.0.174.0.
{ "apiVersion": "1.0.174.0", "sdkVersion": "18.2.53.0" }