- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 08:52 PM
Hi,
I'm using RestAPI to get the incidents from Servicenow which are updated between particular intervals of time (eg: 18-01-2022 10:00 AM to 18-01-2022 10:30 AM). I'm facing timezone related issue while getting the payload from Servicenow.
The issue is as follows:
My Account's TimeZone = America / LosAngels
TimeZone used in API call = UTC
So whenever I fetch the data, I get incidents which are updated between the intervals of American timezone and not UTC timezone. Is there any way that I can fetch data between UTC time intervals irrespective of Account's timezone ?
I have gonethrough timezone related questions in community forum. Unfortunately I haven't found what I'm looking for. Any suggestions or ideas to solve this issue will be highly helpful.
Thanks,
Keerthi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2022 12:56 AM
Hi,
for that I believe you need to use scripted REST API and manipulate and then query and return the results
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 09:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 11:30 PM
Hi Ankur,
My issue is not about getting display values as UTC. I need to fetch the incidents that are updated in American Timezone intervals using its equivalent UTC timezone.
For Example:
If an incident (INC0010012) is updated on = (2022-01-13 03:30:32 / American Timezone)
I should be able to get the above data (INC0010012) as result by using this query `sysparm_query=inc_sys_created_on(2022-01-13 11:30:32 / Equivalent UTC Timezone)`.
But in my case, it is giving me an empty array as an object. Kindly do let me know any ideas on this or elaborate a little bit if I'm missing anything.
Note: I tried your answer, it is still throwing me an empty array. I use postman for API calls
Thanks,
Keerthi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2022 12:56 AM
Hi,
for that I believe you need to use scripted REST API and manipulate and then query and return the results
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 01:11 AM
Thank you for marking my response as helpful.
If my response helped you please mark it correct to close the question so that it benefits future readers as well.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader