Skip to main content

How to Convert Local Time to UTC in Power Apps with TimeZoneOffset

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

TimeZoneOffset tells you how many minutes the user's local time is from UTC at a given moment. Add that number to a local time with DateAdd and you have UTC: in London, 09:00 on 1 July is 08:00 UTC. Pass the moment you're converting, because daylight saving changes the offset.

The example is the Overtime Timesheet app, which runs in London time. Its offset is 0 in winter and -60 in summer, and the change between the two is the extra hour a night shift gets when the clocks go back.

Syntax​

Syntax
TimeZoneOffset([DateTime])
  • DateTime is optional. Leave it out and you get the offset for the current date and time.
  • The result is the number of minutes between the user's local time and UTC (DateAdd, DateDiff, and TimeZoneOffset functions).
  • The sign is the one you add to local time to get UTC. London in summer is an hour ahead of UTC, so its offset is -60. Microsoft's troubleshooting guide gives 480 for Pacific Standard Time, eight hours behind.

Canvas apps take the user's time zone from the browser or device (data types). The app in this example ran in a browser set to London time.

Prerequisites​

Step 1: The Offset Now​

I put each formula into a text control's Text for a moment, so Studio's preview strip shows the result:

Any text control → Text
TimeZoneOffset()

On 8 November, London is on Greenwich Mean Time, the same as UTC, so the offset is 0:

The formula bar with TimeZoneOffset(), the preview strip reading 0 with Data type number, and the text control on the Log overtime screen showing 0

Step 2: The Offset on a Summer Date​

Pass a date and time to get the offset at that moment:

Any text control → Text
TimeZoneOffset(DateTime(2026, 7, 1, 9, 0, 0))

On 1 July, London is on British Summer Time, an hour ahead of UTC, so the offset is -60:

The formula bar with TimeZoneOffset(DateTime(2026, 7, 1, 9, 0, 0)), the preview strip reading -60 with Data type number, and the text control showing -60

The same formula with no date said 0. For a time in July, today's offset would be an hour wrong.

Step 3: Convert a Local Time to UTC​

Add the offset to the time, in minutes, with DateAdd. With names the time t so it's written once and both functions use the same moment (How to Use the With Function in Power Apps):

Any text control → Text
With(
{t: DateTime(2026, 7, 1, 9, 0, 0)},
Text(DateAdd(t, TimeZoneOffset(t), TimeUnit.Minutes), "dd/mm/yyyy hh:mm")
)

09:00 in London on 1 July is 01/07/2026 08:00 UTC:

The formula bar with the With formula converting DateTime(2026, 7, 1, 9, 0, 0) to UTC, the preview strip reading 01/07/2026 08:00 with Data type text, and the text control showing 01/07/2026 08:00

Converting Back from UTC​

Microsoft's page gives the reverse: subtract the offset, by adding its negative. For a UTC date and time in a variable named StartTime:

From Microsoft's DateAdd, DateDiff, and TimeZoneOffset page
DateAdd(StartTime, -TimeZoneOffset(StartTime), TimeUnit.Minutes)

When You Need It​

Most apps never convert. Canvas apps hold every date and time in UTC and show it in the user's time zone, and DateDiff between two moments already counts real time, clock changes included (How to Calculate Hours Across a Daylight Saving Time Change in Power Apps). The Overtime Timesheet app saves the start and finish people choose as they are, and SharePoint showed them at the right London times.

TimeZoneOffset earns its place when you need to:

  • show a time in UTC, or explain to someone in another country what time something happened;
  • check which offset a user's device is on, when dates look a day or an hour out (Microsoft's troubleshooting guide starts there);
  • see where a clock change falls, as in Step 2.

Common Mistakes​

MistakeWhat happensDo this instead
TimeZoneOffset() with no date, for a time on another dateYou get today's offset, an hour wrong across a clock changePass the moment you convert: TimeZoneOffset(t)
Subtracting the offset to get UTCThe time moves the wrong wayAdd it; subtract only to convert from UTC
Expecting +60 for a time zone an hour ahead of UTCThe sign looks backwardsIt's -60: the minutes you add to reach UTC
Saving the converted value to a date and time columnDateAdd changed the moment itself, so the column gets a time an hour early in summerSave the original value, and convert only what you show

Troubleshooting​

SymptomLikely causeFix
The offset is 0 in summerThe device's time zone is UTC or has no daylight savingCheck the device's time zone; canvas apps use the system time zone
The UTC time is an hour out for some datesThe offset came from now, not from that datePass the date to TimeZoneOffset
Two people see different offsetsTheir devices are in different time zonesExpected: the offset is each user's own

FAQ​

Why is the number negative?​

Because it's what you add to local time to reach UTC. London in summer is an hour ahead, so UTC is 60 minutes earlier: -60.

Do I need TimeZoneOffset to calculate hours worked?​

No. DateDiff between two date and time values counts the real minutes, including the extra or missing hour of a clock change.

Can I get UTC as text without DateAdd?​

Microsoft's data types page uses Text with DateTimeFormat.UTC, which returns UTC in ISO 8601 form, such as 2001-09-09T01:46:40.000Z in its example.

Conclusion​

TimeZoneOffset(t) is the number of minutes to add to the local time t to reach UTC, and it changes with daylight saving: 0 in London in November, -60 in July. DateAdd(t, TimeZoneOffset(t), TimeUnit.Minutes) converts, and subtracting the offset converts back.

Additional Resources​