- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2018 03:58 PM
I have this record:
{ "u_implemented": "false", "number": "INNO003008", "sys_id": "36745829db0223004c53d426ca9619b6", "u_description": "Sune Boye Riis was on a bike ride with his youngest son, enjoying the sun slanting over the fields and woodlands near their home north of Copenhagen, when it suddenly occurred to him that something about the experience was amiss. Specifically, something was missing.\r\n\r\nIt was summer. He was out in the country, moving fast. But strangely, he wasn't eating any bugs.", "u_idea_type": "process improvement", "sys_updated_by": "admin", "sys_created_on": "2018-11-27 22:02:32", "sys_mod_count": "1", "sys_updated_on": "2018-11-27 22:03:05", "sys_tags": "", "u_string_2": "The Insect Apocalypse Is Here What does it mean for the rest of life on Earth?", "sys_created_by": "admin" }
When I send this as the sysparm_query, it doesn't return the above record:
`sys_updated_on>javascript:gs.dateGenerate('2018-11-27','22:02:00')^ORsys_created_on>javascript:gs.dateGenerate('2018-11-27','22:02:00')^ORDERBYDESCsys_created_on`
Is there a problem with my query? The record has a `sys_created_on` value of "2018-11-27 22:02:32" and a `sys_updated_on` value of "2018-11-27 22:03:05". Shouldn't that be returned by the above query?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2018 10:36 AM
Best option will be is to set UTC time zone on service account (user record) that you are going to use for REST calls.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2018 08:59 AM
Go to the record you are not getting in response, right click on header and do show XML and make sure sys_created_on and sys_updated_on has same value you are passing in your query. All SN data is stored in UTC zone and based on user zone it will display time so doing show XML will show you correct date/time that you can pass in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2018 09:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2018 10:12 AM
That's the issue than. You need to pass in value in UTC zone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2018 10:24 AM
Ah, that's good to know. Right now, I'm sending
sys_updated_on>javascript:gs.dateGenerate('2018-11-27','22:02:00')
. Is there some way I'm supposed to specify UTC in that date/time?
The sys_created_on of that post is "2018-11-27 22:02:32".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2018 10:36 AM
Best option will be is to set UTC time zone on service account (user record) that you are going to use for REST calls.