Timezone inconsistency when Scripting in Flow Designer Custom Actions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi everyone,
I ran into a timezone issue when using GlideTime APIs inside a Flow Designer Custom Action script.
Scenario
User timezone: Europe/Helsinki
Script is written inside a Custom Action (Script step) in Flow Designer
I am using a GlideTime object and calling:
var gt = new GlideTime(someTimeValue);
var hour = gt.getHourLocalTime();The returned hour was wrong. To investigate further, I checked the session timezone inside the script:
gs.getSession().getTimeZoneName();Interestingly this returned:
America/Los_AngelesInterestingly, when I run the same logic in Background Scripts, the timezone behaves correctly and respects the user's timezone.
Questions
Is this expected behavior because Flow Designer run in a system execution context instead of the user’s session?
If so, what is the recommended way to correctly calculate user-local time (e.g., using getHourLocalTime()) inside Flow Designer scripts?
- Labels:
-
Flow Designer

