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

jay97
Tera Contributor

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 @jay97 ,

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