How to print RITM variable to email when time zone if different

chrish5
Giga Guru

I have a variable called Release Time that I am trying to print into an email.  Below is the variable as it appears in the RITM.  Below that is the line from the email script to print it to the email. Below that is the line in the actual email. You will notice the email time is an hour behind the RITM time.  I think the problem is our parent company that administers the ServiceNow instance is in a time zone that is currently an hour behind us. They don’t change time zones in the spring and fall like we do, so this time difference will vary during the year.

 

All I need this script to do is just print the Release Time to the email exactly like it is.  How do I accomplish that. 

 

Thanks!

 

RITM variable:

chrish5_0-1727384533631.png

 

Email Script:

template.print("\nRelease Time: " +gr.variables.release_time.getDisplayValue());

 

Email:

Release Time: 2024-09-26 14:45:13 CST

0 REPLIES 0