22 Dec 2023 01:58 PM
I'm writing a DQL Block in workflows and I've noticed the times comes back in UTC time. Is there an easy way to localize DQL executions within workflows?
Thank you!
Solved! Go to Solution.
12 Apr 2024 08:00 AM - edited 12 Apr 2024 08:31 AM
Hi @calfano ,
Seems like thing that DT didn't take into account Timezones in automation.
This is good example for RFE, but for now You can do workaround by conversion to timestamp and adding required Timezone change and converting back to date.
fetch logs
| fields time = toTimestamp(now()) | limit 1
| fields time_local = timestampFromUnixSeconds(unixSecondsFromTimestamp(time) + 7200)
Bests
Michal
12 Apr 2025 05:06 PM
| fieldsAdd localisedDateTime = toTimestamp(formatTimestamp(Now(), timezone:"Europe/London"))
List of locales here...
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
31 Mar 2026 03:15 PM
Hello,
I have the same issue using a workflow to trigger a Guardian (SRG).
As you can see my setup was set to use the timeframe 'today' (attachement SRG_timeframe.jpg).
But the result was always starting from 2:00am instead of 12:00am (attachement SRG_results.jpg).
> I could not found a workaround using the native Workflow SRG task.
> I had to add a pre-task using DQL to calculate the correct start time, here is the query (using my timezone) :
data
record(
start = toTimestamp(formatTimestamp(bin(now(), 24h) - (toTimestamp(formatTimestamp(bin(now(), 24h), timezone:"Europe/Paris")) - toTimestamp(formatTimestamp(bin(now(), 24h), timezone:"UTC"))), timezone:"UTC")),
end = toTimestamp(formatTimestamp(Now(), timezone:"Europe/Paris"))
)The start time is calculate with the substraction of the time difference between the 2 timezones.
I use that because we have to handle summer/winter time which cannot be handled by a static value given in the previous solution.
The endtime is not impacted.
Now the result is correct (attachement SRG_results_with_workaround.jpg).
I believe this should be corrected because
Hope this help future workflow users.
Florian
31 Mar 2026 03:16 PM
The missing attachment 😉
Featured Posts