How to Specify Time Zones like ‘+09:00’ in Power Automate HTTP Requests

When trying to specify Japanese time zone directly in an HTTP Request action URL query, I encountered a “DateTime parameter is invalid” error. Here’s how I resolved it.

スポンサーリンク

What I Wanted to Do

This is about specifying time zones like Japan Standard Time in HTTP requests (such as Outlook’s calendarView) that allow time parameters in the URI.
HTTP request with a time zone parameter in the URL
When executing a request with a time zone specification, an error occurs.
Error message showing DateTime parameter is invalid

The Cause and Solution

The problem is with characters like “+” and “:” – in URIs, the “+” is interpreted as a space character, and “:” is a reserved character.
Therefore, when specifying time zones, you need to use the uriComponent function to percent-encode these characters.

If you need to use it in multiple places, it’s convenient to define it beforehand using a “Compose” action.
Using Compose action to define the encoded time zone value
If you only need it in a few places, you can enter the expression directly.
Directly entering the uriComponent expression in the HTTP request
When executed, “+09:00” is converted to “%2B09%3A00”, and the request succeeds.
Successful HTTP request with encoded time zone parameter

Related Articles

コメント

Copied title and URL