- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2023 03:30 AM - edited 03-29-2023 03:31 AM
Hi All,
I have one doubt i.e when we create an object of glide date time , it return time in which timezone ,UTC or system timezone.
For eg . var gdt= new GlideDateTime();
current.fieldname=gdt;
This will populate the field in which timezone , system's timezone?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2023 03:41 AM
Please go through this support article to clear your doubts about instance timezone. https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0714577. An instance timezone can be set using the property glide.sys.default.tz. If this value is not set, it usually picks the timezone of Java Virtual Machine (JVM). This timezone value is used for the display purposes, the actual date time is stored in UTC format in database tables.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2023 03:41 AM
Please go through this support article to clear your doubts about instance timezone. https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0714577. An instance timezone can be set using the property glide.sys.default.tz. If this value is not set, it usually picks the timezone of Java Virtual Machine (JVM). This timezone value is used for the display purposes, the actual date time is stored in UTC format in database tables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2023 04:26 AM
Thanks for the reply. This article is very useful , cleared all my doubts but have one last doubt . The timezone that can be seen on general table in settings (gear) of instance is system timezone only right?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2023 05:40 AM - edited 03-29-2023 05:52 AM
The timezone which you see in the user preference is user's own preference for the timezone. It represents timezone for the logged in user and not the instance. Any changes here will change logged in user's timezone in preference and not the instance's timezone.
However, if you need to set instance timezone, the you can do it via the basic configuration.
To change this value, follow these steps:
- Log in to the instance using an admin account
- Navigate to: System Properties > Basic Configuration
- Scroll to the System timezone for all users unless overridden in the user's record heading
- From the pull-down menu, select the appropriate timezone value you would like to set as the default for the instance (i.e. US/Pacific).
- If you notice that the current value is "System", this indicates that the time zone is the default time zone from the server.
- Save
Reference: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0714577
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2023 04:16 AM
Hi Niharika14,
Here's the description of that scoped method in developer documentation: https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/no-namespace/c_APIRef#r_ScopedG...
var session = gs.getSession();
var zoneName = session.getTimeZoneName();
☆ Community Rising Star 22, 23 & 24 ☆