Is there a full list of global time zones in SNOW I can reference from a cat item variable?

bostonsnow
Kilo Guru

Currently using a Lookup Select Box against sys_user and the Time Zone field but it's not giving me the list list of time zones.

5 REPLIES 5

The SN Nerd
Giga Sage
Giga Sage

You can get a list by querying the sys_choice table querying against the sys_time_zone_conversion_adapter_rule table:

https://your_instance.service-now.com/nav_to.do?uri=%2Fsys_choice_list.do%3Fsysparm_query%3Dname%253Dsys_time_zone_conversion_adapter_rule%26sysparm_first_row%3D1%26sysparm_view%3D

You can then use this API to get the TimeZone object which can be passed to GlideDateTime 

var timeZone = Packages.java.util.TimeZone.getTimeZone('Asia/Tokyo');
var gDateTime = new GlideDateTime().setTZ(timeZone);

Note: Does not work in an Application scope


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022