2

I am trying to write a Rest API client where ServiceNow Database will be polled every 10 minutes to get the Data. Below is the Url that I built: "https://servicenowinstance.com/api/now/table/employee_table?sysparm_limit=200&sysparm_offset=0&sysparm_query=sys_created_onBETWEENjavascript:gs.dateGenerate('2018-02-28','14:23:40')@javascript:gs.dateGenerate('2018-02-28','15:17:04')^ORDERBYsys_created_on".

After implementing Pagination I am starting the Incremental Load. Where I poll every 10 minutes to get the New Data. So in the above URL I get the BETWEEN . So I will get the Data which satisfies the Between Condition. My Question is that the VM machine I use maintains UTC time. And I am not sure which Timezone does the ServiceNow Tables use to store the Data.

In short my question is what Timezone does ServiceNow use to store its Sys_created Field. Is it same as UTC or is it different?

Pavan_Obj
  • 829
  • 7
  • 18

1 Answers1

0

The database stores dates and times as UTC (KB0534905), but depending on how you pull data via REST, it may return in the timezone of the user account being used for authentication.

Take a look at Table API GET, in particular the sysparm_display_value field.

Data retrieval operation for reference and choice fields. Based on this value, retrieves the display value and/or the actual value from the database.

  • true returns display values for all fields.
  • false returns actual values from the database. If a value is not specified, this parameter defaults to false.
  • all returns both actual and display values.

In your case since you're not setting that parameter, it should be in UTC.

Kirk
  • 15,831
  • 19
  • 73
  • 105