Timezones in flows

Hi :slight_smile:

I have a few questions about how timezones are handled in flows.

I set the timezone to Europe/Oslo on the flow’s schedule trigger. I expected the datetimes inside the flow to be in Oslo time too, but when I tested it they came out in UTC.

A few questions:

  1. Is this intended? If so, I find it a bit confusing that you choose a timezone when setting up the trigger. Does that setting only control when the schedule runs?
  2. What’s the recommended way to convert to local time in the function editor? I need it to handle summer and winter time correctly. With the limitations in the function editor, whats the best way to do this?
  3. Running the flow from the app: I also run the same flow from the app, and then it looks like the app’s timezone is used. If so, how do I make sure the conversion only happens when the flow runs on the schedule, and not when it’s called from the app?

Thanks!

// Sigurd

Hi Sigurd,

Thanks for the detailed questions! Taking them in order:

1. Is this intended?
Partly. The timezone on the schedule trigger does more than control when the schedule fires. It’s also the timezone the flow runs in. Built-in features use it: Now, value processors (e.g. Hour, Start of day) and conditions give you Oslo time.

The exception is the function editor. In Flows, the Moment.js library isn’t given the flow’s timezone yet, so moment() inside a function works in UTC. That’s a bug on our side and we’re logging it. In Services this already works.

Also note that datetime values themselves are always stored as UTC ISO strings, like 2026-09-22T08:10:00.000Z. So if you log a raw datetime, it will always look like UTC, even when the flow runs in Oslo time.

Could you tell us where you saw UTC: inside a function, or in a raw datetime value?

2. Converting to local time in the function editor
Until the fix is out, convert explicitly to Europe/Oslo. That handles summer and winter time automatically. Add the Moment.js library to the function and use .tz():

return moment(myDate).tz('Europe/Oslo').format('YYYY-MM-DD HH:mm')
// or, for example:
return moment(myDate).tz('Europe/Oslo').hour()

If you’d rather not use a library, plain JavaScript also works:

return new Date(myDate).toLocaleString('en-GB', { timeZone: 'Europe/Oslo' })

This returns a formatted string rather than a date, so it’s best for display or for reading parts like the hour. Please avoid the “Moment Timezone” library, which is deprecated.

3. Running the same flow from the app
You’re right: when the flow is run from an app, it uses the app’s timezone. If you convert explicitly to 'Europe/Oslo' as shown above, you get the same result whether the flow runs on the schedule or from the app. So you don’t need to detect how it was started.

Thanks for flagging this. I’ll post here when the fix is out.

Hi :slight_smile:

Thank you for the reply. Very helpful. I’ll check it out.

Still a bit confused regarding question 1.

If I have Oslo time zone in the schedule for one of my flows, most of the flow is in Oslo time – but not when using datetime in functions. And this is not intended, but a bug. Yes?

I had UTC time for emails sent by a flow on a schedule where the schedule had time zone Oslo. It was in the Message (HTML).

// Sigurd

Hi Sigurd,

Yes, that’s right. With Europe/Oslo on the schedule, the flow runs in Oslo time. Built-in things like Now, value processors (e.g. Format date, Start of day) and conditions use Oslo time.

Functions are the exception. In Flows, the Moment.js library isn’t given the flow’s timezone, so moment() in a function works in UTC. That isn’t intended; it’s a bug, and we’re logging it.

One thing about functions is by design in both Flows and Services. Datetime values are stored as UTC ISO strings (e.g. 2026-09-22T08:10:00.000Z), and JavaScript’s Date has no timezone. If a function inserts the datetime as-is, or uses new Date(), you’ll get UTC even after our fix.

To help us confirm: how is the date put into the HTML message? With a function using moment, a function using the raw value or Date, or something else?

Either way, here’s what works today:

  • Easiest: in the function editor, add the datetime as a function parameter and give it a Format value processor (e.g. custom format DD.MM.YYYY HH:mm). It’s formatted in the flow’s timezone before it reaches the function, so you just insert the resulting text into your HTML. It also follows summer and winter time automatically.
  • Inside the function: add the Moment.js library and use moment(myDate).tz('Europe/Oslo').format('DD.MM.YYYY HH:mm').

Both give Oslo time regardless of whether the flow runs on the schedule or from the app. The first option uses the flow’s timezone, so a run from an app uses the app’s timezone. The .tz('Europe/Oslo') option is always Oslo.

I used moment() when it returned the datetime in UTC