How to print RITM variable to email when time zone if different
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2024 02:06 PM
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:
Email Script:
template.print("\nRelease Time: " +gr.variables.release_time.getDisplayValue());
Email:
Release Time: 2024-09-26 14:45:13 CST