How to convert IST to CET time zone ? please check.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 06:59 AM - edited 01-29-2023 07:22 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 08:13 AM
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