Date Time avriable in Integration payload is different than the actual

vnarchana
Kilo Contributor

Hello Community,

 

We have a integration with a third party tool, where we pass the variables data in the payload. Everything works fine, But, The DateTime variable value is always different than the value entered by user.

 

Can any one help us here?

TIA

1 ACCEPTED SOLUTION

AnveshKumar M
Tera Sage
Tera Sage

Hi @vnarchana 

The date time variable are stored in UTC time zone in ServiceNow. So if you use getValue on variables it will return UTC value only. You should convert this value to your required time zone using APIs like GlideDateTime.

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh

View solution in original post

2 REPLIES 2

AnveshKumar M
Tera Sage
Tera Sage

Hi @vnarchana 

The date time variable are stored in UTC time zone in ServiceNow. So if you use getValue on variables it will return UTC value only. You should convert this value to your required time zone using APIs like GlideDateTime.

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh

Hi Anvesh,

Thanks for your response, now I understand.

Is it possible for you to provide the script for the same?