I have created a notification on Delegate table

Munny1
Tera Expert

Hello @Ankur Bawiskar 

 

I have created a notification on  delegate table.(sys_user_delegate)

 With start and ends field 

 

Munny1_3-1670849471400.png

 

But when I received a notification it have received through PST time zone by default. How this as been configured?

It should be there current time zone

Capture.PNG

 

 

1 ACCEPTED SOLUTION

@Munny1 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Community Alums
Not applicable

Hi @Munny1 ,

Notifications are designed for multiple recipients. Hence the emails/notifications use the default system timezone mentioned and so this is expected behavior.

Emails use whatever timezone you specify in this property'glide.sys.default.tz'. If you do not specify any value in this property it takes the Pacific time zone. 

If you would want to you could create a custom logic accordingly for converting the display value shown in the email to show the proper time for each date/time field per time zone as well.


Or if the notification is only for one individual, then you should be able to create multiple notifications based upon each time zone of the users you will send to.

 

Hello,

 

Thanks for the reply

 

If you would want to you could create a custom logic accordingly for converting the display value shown in the email to show the proper time for each date/time field per time zone as well.

 

-> I want to achieve  as per about point can you please help me on this

 

 

 

 

 

Community Alums
Not applicable

Hi @Munny1 ,

I can guide you with the help but you need to write the script yourself, refer to this thread for reference :

https://www.servicenow.com/community/developer-forum/email-notification-cannot-get-the-user-time-zon...

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Munny1 

to get display value you can use email script and use script

(function runMailScript(current, template, email, email_action, event) {

	// Add your code here

	template.print("Starts: " + current.starts.getDisplayValue());
	template.print("Ends:" + current.ends.getDisplayValue());

})(current, template, email, email_action, event);

I believe you must be knowing how to include email script in email body

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader