DateTime values in Architect flows and Daylight Savings Time (DST) calculations
Architect deals natively with Coordinated Universal Time (UTC) for DateTime values. With regards to converting a UTC DateTime to a local DateTime for a specific timezone, flow authors must build logic inside the flow to perform this conversion as Architect does not currently include a timezone data type that could be used to supply an offset and Daylight Savings Time (DST) bias.
For example, notice that the Flow.StartDateTimeUtc DateTime variable and the GetCurrentDateTimeUtc() function return DateTime values in UTC. Architect offers various expression functions and operators to help a flow author manipulate DateTime values to suit a flow author’s needs. A common question from flow authors is “How can I convert a DateTime value so that it reflects the UTC DateTime in a specific timezone?” because they want to change flow execution based on that local time. This question may come up when, in a call flow, you only want to route a call to a queue between the hours of 9:00 a.m. and 5:00 p.m. local time.
Functions commonly used to apply an offset to a DateTime and return a resulting DateTime value include:
Some operators can also be used to change a DateTime value. For example, use the + to add a Duration to a DateTime and get a resulting DateTime as well.
The following examples show ways to calculate a local DateTime value from a UTC DateTime and can be modified according to the best fit for your organization.