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.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,376)