Getting time based on user time zone in scoped application

Eli Guttman
Tera Guru

Hi,

 

We are looking for a way to get a certain date and time in specific time zone using a script. While there are few methods available in the global application, we can't find any in a scoped application.

For example, the setTimeZone function is not available in scoped application:

 

 

var mytime = new GlideDateTime();
mytime.setTimeZone(user.time_zone);

 

 

Is there any parallel option in scoped application?

7 REPLIES 7

Hi @Eli Guttman 

 

Can you please let me know the time zone you tried it for ?

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hi, I'm looking for solution that is not depended on the logged in user and the session. I need to pull the time zone in a script from a certain user record, not the user who is logged in,

@Eli Guttman  did you get solutions for the above mentioned case. I need help in implementing  the same