Looks like older answers were fine for older Jackson versions, but since objectMapper has method setTimeZone(tz), setting time zone on a dateFormat is totally ignored. How to properly setup timeZone to the ObjectMapper in Jackson version 2.11.0. Exact time now, time zone, time difference, sunrise/sunset time and key facts for Zulu Time.
When you are passing datetimes through triggers and actions in Microsoft Power Automate, users may find a datetime in the wrong time zone. Users may wish to convert the time zone (frequently in UTC) to their local time.
This is due to services passing dates through in varying formats or time zones. Each connector may use a different datetime format or time zone.
Some services use strictly UTC time to avoid confusion.
There are two ways to solve this - via an action or an expression.
Using the action
Power Automate has a built-in operation called 'Convert time zone'.
Search for 'convert time zone' and choose the 'Convert time zone' operation.
The 'Convert time zone' operation has a few required inputs:
Base time: The datetime you wish to convert.
Source time zone: The time zone that the datetime is currently in.
Destination time zone: The time zone you want to convert your date to.
Eve echoes bases. See the 'Notes' below for ways to find the current time zone.
Using the expression
Power Automate has an expression function for converting time zone.
convertTimeZone(timestamp: string, sourceTimeZone: string, destinationTimeZone: string, format?: string)
Required. A string that contains the time.
Converts a string timestamp passed in from a source time zone to a target time zone
You will need to pass in the following:
timestamp: The datetime you wish to convert.
sourceTimeZone: The time zone the datetime is currently in.
destinationTimeZone: The time zone you want to convert your date to.
format (optional): The format of the time zone you wish to convert your date to.
Zulu Timezone Converter
convertTimeZone(triggerBody()?['Date'],'UTC','Eastern Standard Time','HH:mm')
Here, timestamp is 'triggerBody()?['Date']', the source time zone is 'UTC', the destination time zone is 'Eastern Standard Time', and the format is 'HH:mm'.
Please see the convertTimeZone documentation for more information about this expression function.
Zulu Time Zone Explained
Deciphering a datetime
Datetimes may come in different formats.
If your datetime has a 'Z' at the end, it means it is in UTC time. For example: 2020-04-10T01:28:14.0406387Z
Please see Standard date and time format strings for more information about datetime formats.
You may get errors where your date time string is not in the correct format, ex. 'The date time string must match ISO8601 format'. Please see the formatDateTime expression documentation on how to correctly format your datetime string.
Checking the time zone of an output
If you are unsure what the datetime time zone is currently in, you can run your flow to take a look out the datetime output format.
In this example, the 'Get forecast for today' operation outputs the timestamp for when we got the forecast.
This datetime is using the ISO-8601 datetime format. We can see that this operation outputs the datetime in the UTC timezone.
Zulu Time Zone To Pst
Zulu Time Zone Chart
There may be limitations in some connectors on how the time zone is displayed. Please see the connectors reference documentation for more details on each connector.