Timer activity in workflow - Trigger in GMT time zone irrespective of user's time zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2023 10:05 PM
Hi @Ankur Bawiskar / @Maik Skoddow / @Mohith Devatte
I have a requirement using timer activity, where the workflow should trigger in GMT time zone when global user selects time on form irrespective of the time zones. I used the default configuration of SNOW, but timer activity is working by default by GMT hours, but every time user should change the instance time zone to GMT and then submit the form. But this is creating a chaos. Is there any way to trigger the timer in GMT with irrespective of instance time zone for global users? I have used the variable- 'Start Date' as (Type- Date/Time).
Could someone please help me out?
Thanks,
Saran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2023 11:48 PM
Hi @saran raj
Please use the below script in the default value of the date/time variable:
// Create a GlideDateTime object in GMT timezone
var gmtDateTime = new GlideDateTime();
gmtDateTime.setTZ("GMT"); // Set the timezone to GMT
// Set the date/time variable to the GMT datetime
current.variables.date_time_variable = gmtDateTime;
// Make sure to return true to indicate a successful default value assignment
true;
Please mark this as helpful if it helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 12:07 AM
Hi @msd93
Let me try this script in the variable as a default value but how about Workflow - Timer activity?
What option should I need to select for timer based on?
Please provide your insights on this?
Thanks,
Saran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 12:35 AM
Hi @msd93
I used your suggestion for default value in variable then used below conditions in timer condition but the workflow is not triggering at GMT time zone da.
Any insights on the workflow activity for timer?
Thanks,
Saran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 05:32 AM
Hi @saran raj
Please try using timer based on : script and below script and test the workflow.
You may add the amount of time you need to wait in the script.