Community
Showing results for 
Search instead for 
Do you mean 
Reply

Strange things while searching records by date

Copper Contributor
Posts: 84
Country: Netherlands

Strange things while searching records by date

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.

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Employee
Posts: 33
Country: USA

Re: Strange things while searching records by date

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.

 

 

Highlighted
Copper Contributor
Posts: 84
Country: Netherlands

Re: Strange things while searching records by date

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" }

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands