We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to convert IST to CET time zone ? please check.

JayS56800927307
Tera Expert

I have below code I want to convert  "03/02/2023 08:00:00" IST  to  "2023-02-03 14:25:00" CET  ( Central Europe time . what code should I write?

 

 

var a="03/02/2023 08:00:00";
var gdt = new GlideDateTime(a);

 

output should in the CET time zone when even user give input to the a variable . please help.

5 REPLIES 5

Johns Marokky
Tera Guru

Hi @JayS56800927307 ,

I think you can use the OOTB Script include that is readily available. Use the Below Code.

 

var a="03/02/2023 08:00:00";
var gdt = new GlideDateTime(a);
var convertedTime = global.rmConvertTimeZone(gdt, "IST", "CET");     // format global.rmConvertTimeZone (dateTime, fromTz, toTZ)
gs.print(convertedTime);

 

 

Mark helpful and accept the solution if it helps in Solving your Query.

 

Regards,

Johns