Is there a full list of global time zones in SNOW I can reference from a cat item variable?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2020 12:12 PM
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.
Labels:
- Labels:
-
Service Catalog
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 06:27 PM
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