The Now Platform® Washington DC release is live. Watch now!
‎08-08-2019 07:05 AM
HI All,
I my email notification i need to print current logged in user time zone . But it is picking system time zone. i have tried the below codes but still no luck..
Could any one suggest how can we get logged in user time zone????????
var tz = gs.getUser();
var x = tz.getTZ();
gs.print(x); //O/P : US/Pacific-New
‎08-08-2019 07:08 AM
you can try
var session = gs.getSession();
var zoneName = session.getTimeZoneName();
gs.print(zoneName);
‎08-08-2019 07:35 AM
Hi Patel,
Thanks for the reply. I have kept your code in my email script but still it is taking the system ID not logged in user ID.
But if i run the same script in my background script it is taking loggedin user ID
‎08-08-2019 07:08 AM
Try the following:
var session = gs.getSession();
var zoneName = session.getTimeZoneName();
gs.print(zoneName);
Please mark this as correct/helpful if it resolved your issue!
‎08-08-2019 07:35 AM
Hi ,
Thanks for the reply. I have kept your code in my email script but still it is taking the system ID not logged in user ID.
But if i run the same script in my background script it is taking loggedin user ID