Default system value for [%BeginOfCurrentDay%]

1
Is it possible to set a default timezone for local runtime user? I i used the token [%BeginOfCurrentDay%] in a microflow and inserted it into the After Startup flow. I noticed the local runtime uses UTC time whenever this token is used in the startup, but when i trigger the MF myself it uses my current timezone / default project timezone. I would expect the local runtime to use the default timezone set in the Project Settings when initiating a microflow in the After Startup microflow? Any ideas on this? Or a way to initiate a timestamp within a specific timezone? I did not test it on the cloud env yet.
asked
3 answers
2

Possible, quite solid, workaround: use the 'ExecuteMicroflowAsUser' Java action from the community commons module, which you can download from the appstore. Call this Java action in a microflow after startup, which on his turn calls the microflow of this matter...

answered
1

An after startup microflow is always triggered by the server, not a user. So it's impossible to use a local timezone, as there is no user who's timezone can be used. Therefor the server time is used, which is always UTC. This is to make sure time is handled in a predictable way no matter where the server is located.

The default time zone in the settings is the default timezone for users, purely meant to preselect a timezone and prevent users from scrolling through a long list of timezones.

If you want to manipulate the timezone used in the server, simply use the UTC tokens and add or subtract the necessary hours.

answered
1

I have used a microflow to set a default timezone of London.

In your Startup microwflow Retrieve a System.Timezone object with an XPath parameter = [Code = 'Europe/London'].

When your microflow sets up the Administration.Account set the System.User_Timezone to the value retrieved above.

 

Nick

answered