Time Zone in email notifications Not in contact's time zone

Mohamed Elsayed
Tera Expert

Hi All,

 

I understand that the date and time are stored internally in GMT and displayed in the user’s time zone on forms. However, in email notifications, the time is still shown in GMT, which is problematic since we have customers in various countries (e.g., Singapore, the USA). It should be displayed in the contact’s time zone. I’ve read that using getDisplayValue() in an email notification script can address this, but I haven’t been able to implement it successfully. Could anyone share a script or suggest another solution?

 

Thank you!

 

8 REPLIES 8

Chaitanya ILCR
Kilo Patron

Hi @Mohamed Elsayed ,
You can use GlideDateTime APIs setTimeZone method to covert time to different time zone. while sending the notification extract the user's timezone and pass it to the setTimeZone method (this is not supported in scoped applications).
you can refer this article 

https://snprotips.com/blog/2017/9/12/handling-timezones-in-servicenow-timezoneutil

 

Regards,

Chaitanya

Manasa Reddy Li
Tera Contributor

Hi @Mohamed Elsayed 

I have a similar requirement. Have you tried to achieve this ?

Thanks

Manasa

Hi @Manasa Reddy Li,

 

I tried some solutions but none of them worked for me so far.

Still trying and will update this page if we find any solution that wors.

 

Regards,

Mo

That would be helpful @Mohamed Elsayed , Thankyou !!