Dates timezone issue in integration

rambo1
Tera Guru

Hi Team,

I am sending actual start date and end date from postman to Servicenow.

Instance and my user profile time zone is US/eastern.

So sending present US time to Servicenow but when I see the created change it shows actual and end dates differently.

For example present US time is 12:29 AM I have sent it in 08/23/2023 12:29:02 AM in this format .

But in Servicenow it is showing as 08/23/2023 08:29:02 AM.

What could be the issue ?

4 REPLIES 4

Chetan Mahajan
Kilo Sage
Kilo Sage

Hello @rambo1 ,

It seems like the time zone conversion between your system (Postman) and ServiceNow might be causing the discrepancy in the displayed times. The issue you're experiencing is likely due to the difference in time zones between the Postaman & ServiceNow.
Check the time zone settings in your ServiceNow instance. It's possible that the time zone in ServiceNow is configured to display times in UTC or a different time zone. You might need to adjust the settings to display times in US/Eastern or the desired time zone.

 

Kindly mark correct and helpful if applicable 

Ankur Bawiskar
Tera Patron
Tera Patron

@rambo1 

the API user you are using has which timezone?

also if you are sure always you will get US/Eastern value then set the timezone of the API user as US/Eastern and use setDisplayValue() while setting the target fields

share what script are you using

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

HI Ankur,

I changed the timezone of integration user to US/eastern also instance time zone to same.

I am not uing any code, directly sending 'state_date':'8/23/2023 12:29:02 AM' like this in JSON format.

but still same issue

Also I ran a background script with gs.print(gs.nowDateTime()); and using the same time in postman but stil the same issue