cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SpDev
Helper I
Helper I

Getting some hard times with Delay until in my flow!

Hi,

I am working in a flow that read a Time/Date property in the Site Pages library in SharePoint. 

The idea of the Time/Date is to publish the page at the indicated time and date. 

For that I have created a flow that reads this property and apply delay until to pause the flow until the indicated date and time. It looks like this: 

 

Capture.PNG

 

As you see in the image, tha page should be published at 2019-03-07 13:30 but the time goes and the flow still paused in the same step. 

I have checked that the SharePoint site and MS flow are running under the same time zone and language in case that this is the problem but it makes no difference at all. 

 

in this image show how I create a boolean empty variable before going into the condition:

Capture 2.PNG

 

Once inside the condition I set the variable to this value: 

empty(item()?[body('Get_file_properties')?['Schedule_x0020_publishing_x0020_date']]) to check if the property is empty. 
Is if not empty then I use the value of the property (the date/time) in the Delay until step: 
Capture 3.PNG
 
But Flow get stuck in the Delay until. 
 
What I am doing wrong? 
Does it matters if the sharepoint site is using a different time zone than the MS Flow? 
I live in sweden and MS Flow doesn't have in the settings the swedish time zone (UTC+1 I think).
 
I found the problem. In deed was the time zone. In order to make it work I need to convert the time like this: 
convertFromUtc(triggerBody()?['Start'],'W. Europe Standard Time','yyyy-MM-ddTHH:mmZ') 
 
Edit: Well is not working. I get the right time in the Delay until but the flow runs on hours after and I don't know why, W. Europe Standard Time is the right time zone and Delay until is getting the right time zone !!
 
Best regards
Americo
1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft
Solution Sage
Solution Sage

Hi @SpDev ,

First you need to make sure the time zone of MS flow and your computer system.

The time zone of the 'Schedule_x0020_publishing_x0020_date' in the list is equal to the computer system.

Here in my side the time zone of MS flow is 'UTC', the time zone of my computer system is 'China Standard Time'.

So when I use the 'Schedule_x0020_publishing_x0020_date' in the flow, I need to convert the time zone to 'UTC'.

I have made a test on my side, please take a try with the following workaround:

The expression of Compose 3 is: 

convertToUtc(formatDateTime(outputs('Compose_2'),'yyyy-MM-ddTHH:mm:ss'),'China Standard Time')

Capture1.PNG

You need to convert the time zone of the 'Schedule_x0020_publishing_x0020_date' to the time zone of your Flow in the 'Delay until' action.

 

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-zhos-msft
Solution Sage
Solution Sage

Hi @SpDev ,

First you need to make sure the time zone of MS flow and your computer system.

The time zone of the 'Schedule_x0020_publishing_x0020_date' in the list is equal to the computer system.

Here in my side the time zone of MS flow is 'UTC', the time zone of my computer system is 'China Standard Time'.

So when I use the 'Schedule_x0020_publishing_x0020_date' in the flow, I need to convert the time zone to 'UTC'.

I have made a test on my side, please take a try with the following workaround:

The expression of Compose 3 is: 

convertToUtc(formatDateTime(outputs('Compose_2'),'yyyy-MM-ddTHH:mm:ss'),'China Standard Time')

Capture1.PNG

You need to convert the time zone of the 'Schedule_x0020_publishing_x0020_date' to the time zone of your Flow in the 'Delay until' action.

 

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,667)