Flow designer timezone isue

gillerlaraj
Tera Contributor

HI There,

 

The customer instance is configured with Europe/Paris Timezone.

gillerlaraj_0-1746028856509.png

in Catalog form when i fill date & time in the catalog form as IST, But in flow designer it's not waiting the IST Timezone.

 

This is the script i written to convert timezone:

 


var tdate=fd_data._1__get_catalog_variables.termination_date;
var strConvertedDateTime1 = new GlideScheduleDateTime(tdate).convertTimeZone("UTC","Europe/Paris");
var gdtConvertedDateTime1 = new GlideDateTime(strConvertedDateTime1);
return gdtConvertedDateTime1;

 

 

Regards,

Rajesh

1 REPLY 1

Udayrathore049
Tera Contributor

 

If the user enters the date in IST, and your instance is in Europe/Paris, you need to:

  1. Parse the IST datetime string assuming it is in IST.

  2. Convert it to Europe/Paris timezone.

Here’s a more accurate way to do that:

// Assuming `tdate` is in IST and is a valid datetime string like '2025-05-01 15:00:00' var inputGdt = new GlideDateTime(); inputGdt.setDisplayValue(tdate); // interpreted in system timezone // Adjust IST offset (IST is UTC+5:30) inputGdt.addSeconds(-19800); // Convert from IST to UTC // Now convert UTC to Europe/Paris var parisGdt = new GlideDateTime(inputGdt); parisGdt.setTZ('Europe/Paris'); return parisGdt;