kayp | Posts: 7

date range for from and to parameters on /api/packages call

0 votes
Do the from and to parameters i the /api/packages accept/support time (or just 'yyyy-MM-dd' date)? Are the values based on GMT time?

harishaidary | Posts: 1812

Reply to: date range for from and to parameters on /api/packages call

0 votes
The "from" and "to" parameters do indeed take into account the time. If you leave it empty, it will take packages into account starting from midnight. And the values are indeed GMT time. Sometime next year we will introduce support for multiple time zones. However, there is no confirmed date for this yet.

kayp | Posts: 7

Reply to: date range for from and to parameters on /api/packages call

0 votes
Thanks for the info Harris I just got the chance to try this out, but not having too much luck, could you help take a look to see if I might be submitting the params incorrect? I created 3 packages, and get getPackage call returns the following for the updated value “updated”: “2018-01-04T23:00:41Z” “updated”: “2018-01-04T23:00:39Z” “updated”: “2018-01-04T23:00:34Z” Then I tried to search for them with a date/time range that does not include those times, however all 3 packages are still returning with the params below. Am I using the wrong date/time format? lastUpdatedStartDate=2018-01-04T13:00:01Z lastUpdatedEndDate=2018-01-04T13:00:59Z https://[our server]/api/packages?lastUpdatedStartDate=2018-01-04T13%3A00%3A01Z&lastUpdatedEndDate=2018-01-04T13%3A00%3A59Z&from=1&to=100&sort=created&dir=desc

harishaidary | Posts: 1812

Reply to: date range for from and to parameters on /api/packages call

0 votes
Hi, It seems that there has been a change in our application where it simply ignores the time. I wasn't aware of this change. I will investigate on this and get back to you.

kayp | Posts: 7

Reply to: date range for from and to parameters on /api/packages call

0 votes
Thanks Haris

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off