- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2021 11:58 PM
We are using Europe/Oslo Timezone in our instance....
so when I am using "new GlideDateTime" is it possible to get "CET Time zone"
because as per the servicenow we will get "GMT" right?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2021 12:15 AM
Hi
There are different methods in GlideDateTime to get various formats and date / time
Remember that europe are in CEST at the moment (summer time which adds 1 extra hour to UTC +1)
var gdt = new GlideDateTime(); //Always UTC +0
gs.print(gdt.getValue()); //Always UTC +0
gs.print(gdt.getTZOffset()); //amount of time in ms added to UTC +0 duo to local timezone and summer time
gs.print(gdt.getDisplayValueInternal()); //Local time in server format yyyy-MM-dd HH:mm:ss
gs.print(gdt.getDisplayValue()); //Local formatted local time
Hope it helps you out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2021 12:15 AM
Hi
There are different methods in GlideDateTime to get various formats and date / time
Remember that europe are in CEST at the moment (summer time which adds 1 extra hour to UTC +1)
var gdt = new GlideDateTime(); //Always UTC +0
gs.print(gdt.getValue()); //Always UTC +0
gs.print(gdt.getTZOffset()); //amount of time in ms added to UTC +0 duo to local timezone and summer time
gs.print(gdt.getDisplayValueInternal()); //Local time in server format yyyy-MM-dd HH:mm:ss
gs.print(gdt.getDisplayValue()); //Local formatted local time
Hope it helps you out

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 02:24 PM