Flow designer timezone isue
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 09:08 AM
HI There,
The customer instance is configured with Europe/Paris Timezone.
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2025 03:15 AM
If the user enters the date in IST, and your instance is in Europe/Paris, you need to:
Parse the IST datetime string assuming it is in IST.
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;