Difference in date time parameter data fields on ServiceNow

Aparajita_ACN
Tera Contributor

There is a difference between date time field.

 

We have our system time zone on Europe/Paris, but the backend value of any date/time field is showing on UCT time zone, for which we are facing issue on integration as on the JSON payload it is taking UCT time.

 

Can anyone suggest how to send system time zone date or the front-end value of the field on JSON payload.

4 REPLIES 4

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

The system by default stores all date time fields in GMT. And based on the user's tome zone setting the data is converted and showed in user's time zones.

So when you send JSON payload you will be sending GMT.

-Anurag

Aparajita_ACN
Tera Contributor

@Anurag Tripathi Is there any way to send the display value instead of the backend value on the JSON.

Hi,

By Default it should the backend value only, unless you use getDisplayValue or something like that.

-Anurag

Community Alums
Not applicable

Hi @Aparajita_ACN , 

Can you please try 

var gdt = new GlideDateTime(), gdt.setTimeZone('US/Eastern'), and gs.info(gdt.getDisplayValue())

 

Please mark my answer correct and Helpful if this works for you

 

Thanks and Regards 

Sarthak