The CreatorCon Call for Content is officially open! Get started here.

How to convert any timezone to CET timezone

Pratiksha Lang1
Kilo Sage

How to convert any timezone to CET timezone

1 REPLY 1

Ranjit Nimbalka
Mega Sage

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