How to convert any timezone to CET timezone
This content was last updated in 2024. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2024 11:19 PM
How to convert any timezone to CET timezone
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2024 11:41 PM
Hi @Pratiksha Lang1 ,
Package calls aren't allowed in scoped applications. If you want to change the Timezone of a GlideDateTime object you can use the following.
var now = new GlideDateTime();
gs.print("System Time is " + now);
var gsdt = new GlideScheduleDateTime(now);
gsdt.setTimeZone("Europe/London");
gs.print("London time is " + gsdt.getGlideDateTime().getDisplayValue());If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Ranjit