How to get the Servicenow instance Time Zone that is defined in system property using background script?????????

suprakash
Giga Expert

How to   get the Service now instance Time Zone that is defined in system property using background script?????????

4 REPLIES 4

Julian Hoch
ServiceNow Employee
ServiceNow Employee

Try gs.getProperty("glide.sys.default.tz")


If it's empty, it's America/Los Angeles



See also: Set a system time zone


can i get it displayeed in background   script. suppose in property its given Asia/kolkata


then i need to display it as IST


Thanks Julian 

Regards,
Vijay

preddy
Kilo Guru

HI Suprakash,



If you can use this script in Backgroun:



gs.print("Value : " + gs.getProperty("glide.sys.default.tz"));   It will show Empty TimeZone.



If you try this one:



var gdt = new GlideDateTime();


gs.print("Value : " + gdt.getUserTimeZone());



This will show the User TimeZone



Please hit if you like this